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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Jeff Layton <jlayton@xxxxxxxxxx>

...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@xxxxxxxxxx>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux