diff options
author | Steve French <sfrench@us.ibm.com> | 2007-10-04 16:05:09 -0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2007-10-04 16:05:09 -0400 |
commit | a013689ddb2a4ba5f0452c053c0bf00bafb686f1 (patch) | |
tree | daffe3644ed321b602a1f6a4e97dc6c6ef329dfb /fs/cifs/cifs_debug.c | |
parent | d12fd121afd4f87cbc7675f8f6b651d649534f15 (diff) |
[CIFS] Fix cifsd so shuts down when signing fails during mount
Fixes two problems:
1) we dropped down to negotiating lanman if we did not recognize the
mechanism (krb5 e.g.)
2) we did not stop cifsd (thus will fail when doing rmod cifs with
slab free errors) when we fail tcon but have a bad session (which is
the case in which signing is required but we don't allow signing on
the client)
It also turns on extended security flag in the header when passing
"sec=krb5" on mount command (although kerberos support is not done of
course)
Acked-by: Jeff Layton <jlayton@redhat.com>
CC: Shaggy <shaggy@us.ibm.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/cifs_debug.c')
-rw-r--r-- | fs/cifs/cifs_debug.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/fs/cifs/cifs_debug.c b/fs/cifs/cifs_debug.c index 56c5d9126f50..73c4c419663c 100644 --- a/fs/cifs/cifs_debug.c +++ b/fs/cifs/cifs_debug.c | |||
@@ -879,11 +879,16 @@ security_flags_write(struct file *file, const char __user *buffer, | |||
879 | if (count < 3) { | 879 | if (count < 3) { |
880 | /* single char or single char followed by null */ | 880 | /* single char or single char followed by null */ |
881 | c = flags_string[0]; | 881 | c = flags_string[0]; |
882 | if (c == '0' || c == 'n' || c == 'N') | 882 | if (c == '0' || c == 'n' || c == 'N') { |
883 | extended_security = CIFSSEC_DEF; /* default */ | 883 | extended_security = CIFSSEC_DEF; /* default */ |
884 | else if (c == '1' || c == 'y' || c == 'Y') | 884 | return count; |
885 | } else if (c == '1' || c == 'y' || c == 'Y') { | ||
885 | extended_security = CIFSSEC_MAX; | 886 | extended_security = CIFSSEC_MAX; |
886 | return count; | 887 | return count; |
888 | } else if (!isdigit(c)) { | ||
889 | cERROR(1, ("invalid flag %c", c)); | ||
890 | return -EINVAL; | ||
891 | } | ||
887 | } | 892 | } |
888 | /* else we have a number */ | 893 | /* else we have a number */ |
889 | 894 | ||