From: Jeff Layton Subject: [PATCH 15/15] cifs: temporary hack -- set secType to Kerberos Date: Tue, 30 Mar 2010 15:51:17 -0400 Message-ID: <1269978677-6817-16-git-send-email-jlayton@samba.org> References: <1269978677-6817-1-git-send-email-jlayton@samba.org> Cc: linux-fsdevel@vger.kernel.org To: linux-cifs-client@lists.samba.org Return-path: Received: from mx1.redhat.com ([209.132.183.28]:14455 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754704Ab0C3TvW (ORCPT ); Tue, 30 Mar 2010 15:51:22 -0400 In-Reply-To: <1269978677-6817-1-git-send-email-jlayton@samba.org> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: 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); -- 1.6.6.1