[linux-cifs-client] [PATCH 15/15] cifs: temporary hack -- set secType to Kerberos

Jeff Layton jlayton at samba.org
Tue Mar 30 13:51:17 MDT 2010


From: Jeff Layton <jlayton at redhat.com>

...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 <jlayton at redhat.com>
---
 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



More information about the linux-cifs-client mailing list