From patchwork Thu Jan 24 18:34:56 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chuck Lever X-Patchwork-Id: 215467 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from userp1040.oracle.com (userp1040.oracle.com [156.151.31.81]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "userp1040.oracle.com", Issuer "VeriSign Class 3 International Server CA - G3" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 922C12C008C for ; Fri, 25 Jan 2013 05:35:05 +1100 (EST) Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by userp1040.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id r0OIZ2Xf013636 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 24 Jan 2013 18:35:03 GMT Received: from oss.oracle.com (oss-external.oracle.com [137.254.96.51]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r0OIZ1MP002412 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 24 Jan 2013 18:35:02 GMT Received: from localhost ([127.0.0.1] helo=oss.oracle.com) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1TyRdd-0000OV-LT; Thu, 24 Jan 2013 10:35:01 -0800 Received: from ucsinet22.oracle.com ([156.151.31.94]) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1TyRda-0000OF-UR for fedfs-utils-devel@oss.oracle.com; Thu, 24 Jan 2013 10:34:59 -0800 Received: from aserp1030.oracle.com (aserp1030.oracle.com [141.146.126.68]) by ucsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r0OIYw8B013255 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 24 Jan 2013 18:34:58 GMT Received: from mail-ob0-f172.google.com (mail-ob0-f172.google.com [209.85.214.172]) by aserp1030.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id r0OIYvS0003802 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Thu, 24 Jan 2013 18:34:57 GMT Received: by mail-ob0-f172.google.com with SMTP id ta17so5044889obb.31 for ; Thu, 24 Jan 2013 10:34:57 -0800 (PST) X-Received: by 10.50.40.229 with SMTP id a5mr2176197igl.59.1359052497391; Thu, 24 Jan 2013 10:34:57 -0800 (PST) Received: from seurat.1015granger.net ([99.26.161.222]) by mx.google.com with ESMTPS id l6sm1849401igw.10.2013.01.24.10.34.56 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 24 Jan 2013 10:34:56 -0800 (PST) From: Chuck Lever To: fedfs-utils-devel@oss.oracle.com Date: Thu, 24 Jan 2013 13:34:56 -0500 Message-ID: <20130124183455.13601.34878.stgit@seurat.1015granger.net> In-Reply-To: <20130124182619.13601.61251.stgit@seurat.1015granger.net> References: <20130124182619.13601.61251.stgit@seurat.1015granger.net> User-Agent: StGIT/0.14.3 MIME-Version: 1.0 X-Flow-Control-Info: class=Default reputation=ipRepBelow100 ip=209.85.214.172 ct-class=R6 ct-vol1=0 ct-vol2=0 ct-vol3=0 ct-risk=68 ct-spam1=0 ct-spam2=0 ct-bulk=0 rcpts=1 size=916 X-MM-CT-Classification: not spam X-MM-CT-RefID: str=0001.0A090201.51017ED2.0003,ss=1,re=0.000,fgs=0 Subject: [fedfs-utils] [PATCH 03/11] libnsdb: nsdb_open_nsdb() returns incorrect error code X-BeenThere: fedfs-utils-devel@oss.oracle.com X-Mailman-Version: 2.1.9 Precedence: list Reply-To: fedfs-utils Developers List-Id: fedfs-utils Developers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: fedfs-utils-devel-bounces@oss.oracle.com Errors-To: fedfs-utils-devel-bounces@oss.oracle.com X-Source-IP: acsinet21.oracle.com [141.146.126.237] 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; }