aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/cifs/cifs_debug.c14
-rw-r--r--fs/cifs/cifsencrypt.c2
-rw-r--r--fs/cifs/cifsfs.c2
-rw-r--r--fs/cifs/cifsglob.h2
-rw-r--r--fs/cifs/cifssmb.c2
-rw-r--r--fs/cifs/connect.c2
6 files changed, 12 insertions, 12 deletions
diff --git a/fs/cifs/cifs_debug.c b/fs/cifs/cifs_debug.c
index 54951804734c..4fce6e61b34e 100644
--- a/fs/cifs/cifs_debug.c
+++ b/fs/cifs/cifs_debug.c
@@ -716,7 +716,7 @@ static const struct file_operations cifs_multiuser_mount_proc_fops = {
716 716
717static int cifs_security_flags_proc_show(struct seq_file *m, void *v) 717static int cifs_security_flags_proc_show(struct seq_file *m, void *v)
718{ 718{
719 seq_printf(m, "0x%x\n", extended_security); 719 seq_printf(m, "0x%x\n", global_secflags);
720 return 0; 720 return 0;
721} 721}
722 722
@@ -744,10 +744,10 @@ static ssize_t cifs_security_flags_proc_write(struct file *file,
744 /* single char or single char followed by null */ 744 /* single char or single char followed by null */
745 c = flags_string[0]; 745 c = flags_string[0];
746 if (c == '0' || c == 'n' || c == 'N') { 746 if (c == '0' || c == 'n' || c == 'N') {
747 extended_security = CIFSSEC_DEF; /* default */ 747 global_secflags = CIFSSEC_DEF; /* default */
748 return count; 748 return count;
749 } else if (c == '1' || c == 'y' || c == 'Y') { 749 } else if (c == '1' || c == 'y' || c == 'Y') {
750 extended_security = CIFSSEC_MAX; 750 global_secflags = CIFSSEC_MAX;
751 return count; 751 return count;
752 } else if (!isdigit(c)) { 752 } else if (!isdigit(c)) {
753 cERROR(1, "invalid flag %c", c); 753 cERROR(1, "invalid flag %c", c);
@@ -771,12 +771,12 @@ static ssize_t cifs_security_flags_proc_write(struct file *file,
771 return -EINVAL; 771 return -EINVAL;
772 } 772 }
773 /* flags look ok - update the global security flags for cifs module */ 773 /* flags look ok - update the global security flags for cifs module */
774 extended_security = flags; 774 global_secflags = flags;
775 if (extended_security & CIFSSEC_MUST_SIGN) { 775 if (global_secflags & CIFSSEC_MUST_SIGN) {
776 /* requiring signing implies signing is allowed */ 776 /* requiring signing implies signing is allowed */
777 extended_security |= CIFSSEC_MAY_SIGN; 777 global_secflags |= CIFSSEC_MAY_SIGN;
778 cFYI(1, "packet signing now required"); 778 cFYI(1, "packet signing now required");
779 } else if ((extended_security & CIFSSEC_MAY_SIGN) == 0) { 779 } else if ((global_secflags & CIFSSEC_MAY_SIGN) == 0) {
780 cFYI(1, "packet signing disabled"); 780 cFYI(1, "packet signing disabled");
781 } 781 }
782 /* BB should we turn on MAY flags for other MUST options? */ 782 /* BB should we turn on MAY flags for other MUST options? */
diff --git a/fs/cifs/cifsencrypt.c b/fs/cifs/cifsencrypt.c
index 61e415252069..847628dfdc44 100644
--- a/fs/cifs/cifsencrypt.c
+++ b/fs/cifs/cifsencrypt.c
@@ -291,7 +291,7 @@ void calc_lanman_hash(const char *password, const char *cryptkey, bool encrypt,
291 if (password) 291 if (password)
292 strncpy(password_with_pad, password, CIFS_ENCPWD_SIZE); 292 strncpy(password_with_pad, password, CIFS_ENCPWD_SIZE);
293 293
294 if (!encrypt && extended_security & CIFSSEC_MAY_PLNTXT) { 294 if (!encrypt && global_secflags & CIFSSEC_MAY_PLNTXT) {
295 memset(lnm_session_key, 0, CIFS_SESS_KEY_SIZE); 295 memset(lnm_session_key, 0, CIFS_SESS_KEY_SIZE);
296 memcpy(lnm_session_key, password_with_pad, 296 memcpy(lnm_session_key, password_with_pad,
297 CIFS_ENCPWD_SIZE); 297 CIFS_ENCPWD_SIZE);
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index 53e794131c2a..440e98ca01e3 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -61,7 +61,7 @@ unsigned int experimEnabled = 0;
61unsigned int linuxExtEnabled = 1; 61unsigned int linuxExtEnabled = 1;
62unsigned int lookupCacheEnabled = 1; 62unsigned int lookupCacheEnabled = 1;
63unsigned int multiuser_mount = 0; 63unsigned int multiuser_mount = 0;
64unsigned int extended_security = CIFSSEC_DEF; 64unsigned int global_secflags = CIFSSEC_DEF;
65/* unsigned int ntlmv2_support = 0; */ 65/* unsigned int ntlmv2_support = 0; */
66unsigned int sign_CIFS_PDUs = 1; 66unsigned int sign_CIFS_PDUs = 1;
67static const struct super_operations cifs_super_ops; 67static const struct super_operations cifs_super_ops;
diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h
index ecf0ffbe2b64..4a2715b389c6 100644
--- a/fs/cifs/cifsglob.h
+++ b/fs/cifs/cifsglob.h
@@ -717,7 +717,7 @@ GLOBAL_EXTERN unsigned int multiuser_mount; /* if enabled allows new sessions
717GLOBAL_EXTERN unsigned int oplockEnabled; 717GLOBAL_EXTERN unsigned int oplockEnabled;
718GLOBAL_EXTERN unsigned int experimEnabled; 718GLOBAL_EXTERN unsigned int experimEnabled;
719GLOBAL_EXTERN unsigned int lookupCacheEnabled; 719GLOBAL_EXTERN unsigned int lookupCacheEnabled;
720GLOBAL_EXTERN unsigned int extended_security; /* if on, session setup sent 720GLOBAL_EXTERN unsigned int global_secflags; /* if on, session setup sent
721 with more secure ntlmssp2 challenge/resp */ 721 with more secure ntlmssp2 challenge/resp */
722GLOBAL_EXTERN unsigned int sign_CIFS_PDUs; /* enable smb packet signing */ 722GLOBAL_EXTERN unsigned int sign_CIFS_PDUs; /* enable smb packet signing */
723GLOBAL_EXTERN unsigned int linuxExtEnabled;/*enable Linux/Unix CIFS extensions*/ 723GLOBAL_EXTERN unsigned int linuxExtEnabled;/*enable Linux/Unix CIFS extensions*/
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
index 980c38c658b7..4ecb361640bf 100644
--- a/fs/cifs/cifssmb.c
+++ b/fs/cifs/cifssmb.c
@@ -372,7 +372,7 @@ CIFSSMBNegotiate(unsigned int xid, struct cifsSesInfo *ses)
372 if (ses->overrideSecFlg & (~(CIFSSEC_MUST_SIGN | CIFSSEC_MUST_SEAL))) 372 if (ses->overrideSecFlg & (~(CIFSSEC_MUST_SIGN | CIFSSEC_MUST_SEAL)))
373 secFlags = ses->overrideSecFlg; /* BB FIXME fix sign flags? */ 373 secFlags = ses->overrideSecFlg; /* BB FIXME fix sign flags? */
374 else /* if override flags set only sign/seal OR them with global auth */ 374 else /* if override flags set only sign/seal OR them with global auth */
375 secFlags = extended_security | ses->overrideSecFlg; 375 secFlags = global_secflags | ses->overrideSecFlg;
376 376
377 cFYI(1, "secFlags 0x%x", secFlags); 377 cFYI(1, "secFlags 0x%x", secFlags);
378 378
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index c104f54cadfe..c2793bd1db4a 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -2748,7 +2748,7 @@ CIFSTCon(unsigned int xid, struct cifsSesInfo *ses,
2748 by Samba (not sure whether other servers allow 2748 by Samba (not sure whether other servers allow
2749 NTLMv2 password here) */ 2749 NTLMv2 password here) */
2750#ifdef CONFIG_CIFS_WEAK_PW_HASH 2750#ifdef CONFIG_CIFS_WEAK_PW_HASH
2751 if ((extended_security & CIFSSEC_MAY_LANMAN) && 2751 if ((global_secflags & CIFSSEC_MAY_LANMAN) &&
2752 (ses->server->secType == LANMAN)) 2752 (ses->server->secType == LANMAN))
2753 calc_lanman_hash(tcon->password, ses->server->cryptKey, 2753 calc_lanman_hash(tcon->password, ses->server->cryptKey,
2754 ses->server->secMode & 2754 ses->server->secMode &