diff mbox

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

Message ID 1269978677-6817-16-git-send-email-jlayton@samba.org
State New
Headers show

Commit Message

Jeff Layton March 30, 2010, 7:51 p.m. UTC
From: Jeff Layton <jlayton@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@redhat.com>
---
 fs/cifs/connect.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
diff mbox

Patch

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);