diff options
author | Steve French <sfrench@us.ibm.com> | 2011-04-12 01:24:57 +0000 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2011-04-12 01:27:45 +0000 |
commit | d9b942013730c38ac83564d6669c6d0ecf6d754d (patch) | |
tree | 91dad22a8b0a6a39216a4d016e2822e70ae5edad /fs/cifs/connect.c | |
parent | fd88ce9313e9f9d3b56eada7fc76a301828baefd (diff) | |
download | op-kernel-dev-d9b942013730c38ac83564d6669c6d0ecf6d754d.zip op-kernel-dev-d9b942013730c38ac83564d6669c6d0ecf6d754d.tar.gz |
[CIFS] Warn on requesting default security (ntlm) on mount
Warn once if default security (ntlm) requested. We will
update the default to the stronger security mechanism
(ntlmv2) in 2.6.41. Kerberos is also stronger than
ntlm, but more servers support ntlmv2 and ntlmv2
does not require an upcall, so ntlmv2 is a better
default.
Reviewed-by: Jeff Layton <jlayton@redhat.com>
CC: Suresh Jayaraman <sjayaraman@suse.de>
Reviewed-by: Shirish Pargaonkar <shirishp@us.ibm.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/connect.c')
-rw-r--r-- | fs/cifs/connect.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 8cf4a63..db9d55b 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -1854,6 +1854,8 @@ cifs_put_smb_ses(struct cifsSesInfo *ses) cifs_put_tcp_session(server); } +static bool warned_on_ntlm; /* globals init to false automatically */ + static struct cifsSesInfo * cifs_get_smb_ses(struct TCP_Server_Info *server, struct smb_vol *volume_info) { @@ -1928,6 +1930,15 @@ cifs_get_smb_ses(struct TCP_Server_Info *server, struct smb_vol *volume_info) } ses->cred_uid = volume_info->cred_uid; ses->linux_uid = volume_info->linux_uid; + + /* ntlmv2 is much stronger than ntlm security, and has been broadly + supported for many years, time to update default security mechanism */ + if ((volume_info->secFlg == 0) && warned_on_ntlm == false) { + warned_on_ntlm = true; + cERROR(1, "default security mechanism requested. The default " + "security mechanism will be upgraded from ntlm to " + "ntlmv2 in kernel release 2.6.41"); + } ses->overrideSecFlg = volume_info->secFlg; mutex_lock(&ses->session_mutex); |