From patchwork Tue Apr 21 12:28:31 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Layton X-Patchwork-Id: 19168 Received: from lists.samba.org (mail.samba.org [66.70.73.150]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n3LCVDj5020574 for ; Tue, 21 Apr 2009 12:31:13 GMT Received: from dp.samba.org (localhost [127.0.0.1]) by lists.samba.org (Postfix) with ESMTP id BF115163CD6 for ; Tue, 21 Apr 2009 12:30:51 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on dp.samba.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.8 tests=AWL,BAYES_00, FORGED_RCVD_HELO,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.1.7 X-Original-To: linux-cifs-client@lists.samba.org Delivered-To: linux-cifs-client@lists.samba.org Received: from mx2.redhat.com (mx2.redhat.com [66.187.237.31]) by lists.samba.org (Postfix) with ESMTP id 01000163B27; Tue, 21 Apr 2009 12:28:51 +0000 (GMT) Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n3LCTD8L016342; Tue, 21 Apr 2009 08:29:13 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n3LCTCbm026974; Tue, 21 Apr 2009 08:29:12 -0400 Received: from localhost.localdomain (vpn-10-136.str.redhat.com [10.32.10.136]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n3LCSvVq023411; Tue, 21 Apr 2009 08:29:09 -0400 From: Jeff Layton To: linux-cifs-client@lists.samba.org Date: Tue, 21 Apr 2009 08:28:31 -0400 Message-Id: <1240316911-15822-3-git-send-email-jlayton@redhat.com> In-Reply-To: <1240316911-15822-1-git-send-email-jlayton@redhat.com> References: <1240316911-15822-1-git-send-email-jlayton@redhat.com> X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 Cc: samba-technical@lists.samba.org Subject: [linux-cifs-client] [PATCH 2/2] mount.cifs: stuff pass= option with $KRB5CCNAME when sec=krb5 is specified X-BeenThere: linux-cifs-client@lists.samba.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: The Linux CIFS VFS client List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-cifs-client-bounces+patchwork-cifs-client=patchwork.kernel.org@lists.samba.org Errors-To: linux-cifs-client-bounces+patchwork-cifs-client=patchwork.kernel.org@lists.samba.org Signed-off-by: Jeff Layton --- source3/client/mount.cifs.c | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/source3/client/mount.cifs.c b/source3/client/mount.cifs.c index 0c551cc..d2bcd10 100644 --- a/source3/client/mount.cifs.c +++ b/source3/client/mount.cifs.c @@ -369,6 +369,7 @@ static int parse_options(char ** optionsp, int * filesys_flags) char * value = NULL; char * next_keyword = NULL; char * out = NULL; + char * ccname; int out_len = 0; int word_len; int rc = 0; @@ -484,9 +485,13 @@ static int parse_options(char ** optionsp, int * filesys_flags) } } else if (strncmp(data, "sec", 3) == 0) { if (value) { - if (!strncmp(value, "none", 4) || - !strncmp(value, "krb5", 4)) + if (!strncmp(value, "none", 4)) { got_password = 1; + } else if (!strncmp(value, "krb5", 4)) { + got_password = 1; + if (ccname = getenv("KRB5CCNAME")) + mountpassword = strdup(ccname); + } } } else if (strncmp(data, "ip", 2) == 0) { if (!value || !*value) {