@@ -515,6 +515,8 @@ nsdb_read_certfile(const char *pathname, char **certdata,
goto out;
}
+ xlog(D_CALL, "%s: Successfully read %s", __func__, pathname);
+
(void)close(fd);
*certdata = buf;
*certlen = stb.st_size;
@@ -363,9 +363,11 @@ nsdbparams_update(const char *progname, int argc, char **argv)
goto out;
}
- if (nsdb_read_certfile(certfile, &secdata.data,
- &secdata.len) != FEDFS_OK) {
- xlog(L_ERROR, "Failed to read certfile");
+ retval = nsdb_read_certfile(certfile,
+ &secdata.data, &secdata.len);
+ if (retval != FEDFS_OK) {
+ xlog(L_ERROR, "Failed to read certfile: %s",
+ nsdb_display_fedfsstatus(retval));
goto out;
}
}
Report specific error conditions when reading a certfile fails. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> --- src/libnsdb/nsdb.c | 2 ++ src/nsdbparams/update.c | 8 +++++--- 2 files changed, 7 insertions(+), 3 deletions(-)