From patchwork Thu Jan 24 18:34:56 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [03/11] libnsdb: nsdb_open_nsdb() returns incorrect error code X-Patchwork-Submitter: Chuck Lever X-Patchwork-Id: 215467 Message-Id: <20130124183455.13601.34878.stgit@seurat.1015granger.net> To: fedfs-utils-devel@oss.oracle.com Date: Thu, 24 Jan 2013 13:34:56 -0500 From: Chuck Lever List-Id: fedfs-utils Developers 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 --- 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; }