From patchwork Tue Mar 30 19:51:17 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Layton X-Patchwork-Id: 49049 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.samba.org (fn.samba.org [216.83.154.106]) by ozlabs.org (Postfix) with ESMTP id 40F19B6ED0 for ; Wed, 31 Mar 2010 06:52:01 +1100 (EST) Received: from fn.samba.org (localhost [127.0.0.1]) by lists.samba.org (Postfix) with ESMTP id DCA89AD1B8; Tue, 30 Mar 2010 13:52:01 -0600 (MDT) X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on fn.samba.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.8 tests=BAYES_00, RCVD_IN_DNSWL_HI, SPF_HELO_PASS,SPF_NEUTRAL autolearn=ham version=3.2.5 X-Original-To: linux-cifs-client@lists.samba.org Delivered-To: linux-cifs-client@lists.samba.org Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by lists.samba.org (Postfix) with ESMTP id 9E71EAD274 for ; Tue, 30 Mar 2010 13:51:23 -0600 (MDT) Received: from int-mx04.intmail.prod.int.phx2.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.17]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o2UJpLIh006798 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 30 Mar 2010 15:51:22 -0400 Received: from localhost.localdomain (vpn-10-89.rdu.redhat.com [10.11.10.89]) by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o2UJp84X024778; Tue, 30 Mar 2010 15:51:21 -0400 From: Jeff Layton To: linux-cifs-client@lists.samba.org Date: Tue, 30 Mar 2010 15:51:17 -0400 Message-Id: <1269978677-6817-16-git-send-email-jlayton@samba.org> In-Reply-To: <1269978677-6817-1-git-send-email-jlayton@samba.org> References: <1269978677-6817-1-git-send-email-jlayton@samba.org> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.17 Cc: linux-fsdevel@vger.kernel.org Subject: [linux-cifs-client] [PATCH 15/15] cifs: temporary hack -- set secType to Kerberos X-BeenThere: linux-cifs-client@lists.samba.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: The Linux CIFS VFS client List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-cifs-client-bounces@lists.samba.org Errors-To: linux-cifs-client-bounces@lists.samba.org From: Jeff Layton ...fixing this the right way requires an overhaul of how authentication is handled. Note that this breaks multiple mounts to the same server that use non-krb5 auth. For the first mount to the server, CIFSMBNegotiate will clobber this setting. Subsequent mounts that use the same TCP_Server_Info though will bypass that call and will end up using krb5. The right way to fix this is to change how the secType gets set in the first place such that it's decided on a per-session basis rather than in CIFSSMBNegotiate. Signed-off-by: Jeff Layton --- fs/cifs/connect.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 9bf590d..4b0c924 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -1714,6 +1714,7 @@ cifs_get_smb_ses(struct TCP_Server_Info *server, struct smb_vol *volume_info) ses->linux_uid = volume_info->linux_uid; ses->linux_fsuid = current_fsuid(); ses->overrideSecFlg = volume_info->secFlg; + ses->secType = Kerberos; mutex_lock(&ses->session_mutex); rc = cifs_setup_session(xid, ses, volume_info->local_nls);