[fedfs-utils] [PATCH 03/11] libnsdb: nsdb_open_nsdb() returns incorrect error code

Chuck Lever chuck.lever at oracle.com
Thu Jan 24 10:34:56 PST 2013


The invalid security type here comes from our own NSDB connection
parameters database.  Thus it is a screw-up in fedfs-utils itself
that allows this invalid data.

FEDFS_ERR_NSDB_AUTH is marginally correct, since we can't authenticate
the NSDB using the provided security type, but FEDFS_ERR_NSDB_PARAMS
is a better indication of what's gone wrong.

Signed-off-by: Chuck Lever <chuck.lever at oracle.com>
---

 src/libnsdb/nsdb.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/libnsdb/nsdb.c b/src/libnsdb/nsdb.c
index 94f9317..891c35b 100644
--- a/src/libnsdb/nsdb.c
+++ b/src/libnsdb/nsdb.c
@@ -1505,7 +1505,7 @@ nsdb_open_nsdb(nsdb_t host, const char *binddn, const char *passwd,
 	default:
 		xlog(D_GENERAL, "%s: Host contains invalid sectype",
 			__func__);
-		retval = FEDFS_ERR_NSDB_AUTH;
+		retval = FEDFS_ERR_NSDB_PARAMS;
 		goto out_unbind;
 	}
 




More information about the fedfs-utils-devel mailing list