diff options
author | Jeff Layton <jlayton@redhat.com> | 2013-06-27 12:45:00 -0400 |
---|---|---|
committer | Steve French <smfrench@gmail.com> | 2013-06-27 23:42:18 -0500 |
commit | 50285882fdd919e2b9617fc844b4816b7833f115 (patch) | |
tree | dfe5f3d8ffd8ffd520f12234712ca3a07db69039 /fs/cifs/cifssmb.c | |
parent | e65a5cb41718e0eb17a470bc3acf2c3b2f00f1d0 (diff) | |
download | lwn-50285882fdd919e2b9617fc844b4816b7833f115.tar.gz lwn-50285882fdd919e2b9617fc844b4816b7833f115.zip |
cifs: fix SMB2 signing enablement in cifs_enable_signing
Commit 9ddec56131 (cifs: move handling of signed connections into
separate function) broke signing on SMB2/3 connections. While the code
to enable signing on the connections was very similar between the two,
the bits that get set in the sec_mode are different.
Declare a couple of new smb_version_values fields and set them
appropriately for SMB1 and SMB2/3. Then change cifs_enable_signing to
use those instead.
Reported-by: Shirish Pargaonkar <shirishpargaonkar@gmail.com>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Tested-by: Shirish Pargaonkar <shirishpargaonkar@gmail.com>
Signed-off-by: Steve French <smfrench@gmail.com>
Diffstat (limited to 'fs/cifs/cifssmb.c')
-rw-r--r-- | fs/cifs/cifssmb.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c index a35aad2060c5..bc7dfa857384 100644 --- a/fs/cifs/cifssmb.c +++ b/fs/cifs/cifssmb.c @@ -407,8 +407,8 @@ decode_ext_sec_blob(struct cifs_ses *ses, NEGOTIATE_RSP *pSMBr) int cifs_enable_signing(struct TCP_Server_Info *server, bool mnt_sign_required) { - bool srv_sign_required = server->sec_mode & SECMODE_SIGN_REQUIRED; - bool srv_sign_enabled = server->sec_mode & SECMODE_SIGN_ENABLED; + bool srv_sign_required = server->sec_mode & server->vals->signing_required; + bool srv_sign_enabled = server->sec_mode & server->vals->signing_enabled; bool mnt_sign_enabled = global_secflags & CIFSSEC_MAY_SIGN; /* |