From patchwork Tue Jan 8 17:27:15 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chuck Lever X-Patchwork-Id: 210448 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 404392C0085 for ; Wed, 9 Jan 2013 04:27:32 +1100 (EST) Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by userp1040.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id r08HRTxI029416 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 8 Jan 2013 17:27:30 GMT Received: from oss.oracle.com (oss-external.oracle.com [137.254.96.51]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r08HRTef008216 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 8 Jan 2013 17:27:29 GMT Received: from localhost ([127.0.0.1] helo=oss.oracle.com) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1TscxU-0001Fg-Py; Tue, 08 Jan 2013 09:27:29 -0800 Received: from acsinet22.oracle.com ([141.146.126.238]) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1TscxK-0001F9-3r for fedfs-utils-devel@oss.oracle.com; Tue, 08 Jan 2013 09:27:18 -0800 Received: from aserp1030.oracle.com (aserp1030.oracle.com [141.146.126.68]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r08HRH4c007914 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 8 Jan 2013 17:27:18 GMT Received: from mail-ie0-f174.google.com (mail-ie0-f174.google.com [209.85.223.174]) by aserp1030.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id r08HRG5b026954 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Tue, 8 Jan 2013 17:27:17 GMT Received: by mail-ie0-f174.google.com with SMTP id c11so829336ieb.19 for ; Tue, 08 Jan 2013 09:27:16 -0800 (PST) X-Received: by 10.50.51.231 with SMTP id n7mr9733289igo.85.1357666036763; Tue, 08 Jan 2013 09:27:16 -0800 (PST) Received: from seurat.1015granger.net (adsl-99-26-161-222.dsl.sfldmi.sbcglobal.net. [99.26.161.222]) by mx.google.com with ESMTPS id qn10sm285721igc.15.2013.01.08.09.27.15 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 08 Jan 2013 09:27:16 -0800 (PST) From: Chuck Lever To: fedfs-utils-devel@oss.oracle.com Date: Tue, 08 Jan 2013 12:27:15 -0500 Message-ID: <20130108172714.65133.85057.stgit@seurat.1015granger.net> In-Reply-To: <20130108172057.65133.25145.stgit@seurat.1015granger.net> References: <20130108172057.65133.25145.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.223.174 ct-class=R5 ct-vol1=0 ct-vol2=8 ct-vol3=8 ct-risk=50 ct-spam1=80 ct-spam2=6 ct-bulk=5 rcpts=1 size=1261 X-MM-CT-Classification: not spam X-MM-CT-RefID: str=0001.0A090206.50EC56F5.00A7,ss=1,re=0.000,fgs=0 Subject: [fedfs-utils] [PATCH 01/13] nsdbparams: Improve certfile debugging messages 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: acsinet22.oracle.com [141.146.126.238] Report specific error conditions when reading a certfile fails. Signed-off-by: Chuck Lever --- src/libnsdb/nsdb.c | 2 ++ src/nsdbparams/update.c | 8 +++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/libnsdb/nsdb.c b/src/libnsdb/nsdb.c index 20d9e55..3f10c4d 100644 --- a/src/libnsdb/nsdb.c +++ b/src/libnsdb/nsdb.c @@ -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; diff --git a/src/nsdbparams/update.c b/src/nsdbparams/update.c index d073552..c436876 100644 --- a/src/nsdbparams/update.c +++ b/src/nsdbparams/update.c @@ -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; } }