diff options
author | Steve French <sfrench@us.ibm.com> | 2007-10-17 22:58:40 -0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2007-10-17 22:58:40 -0400 |
commit | abb63d6c3d3d0e4d93b63589135962091154be9b (patch) | |
tree | b0b22474c4bbaa5f95f4ad1f5c4ee2178a74fc9a | |
parent | d628ddb62d3050e8e474aa3566bc6bafbe4b9c26 (diff) |
[CIFS] Return better error when server requires signing but client forbids
Signed-off-by: Steve French <sfrench@us.ibm.com>
-rw-r--r-- | fs/cifs/CHANGES | 3 | ||||
-rw-r--r-- | fs/cifs/cifssmb.c | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/fs/cifs/CHANGES b/fs/cifs/CHANGES index 2459ef0a1396..3d419163c3d3 100644 --- a/fs/cifs/CHANGES +++ b/fs/cifs/CHANGES | |||
@@ -11,7 +11,8 @@ connect fails (e.g. due to signing negotiation failure) fix | |||
11 | leak that causes cifsd not to stop and rmmod to fail to cleanup | 11 | leak that causes cifsd not to stop and rmmod to fail to cleanup |
12 | cifs_request_buffers pool. Fix problem with POSIX Open/Mkdir on | 12 | cifs_request_buffers pool. Fix problem with POSIX Open/Mkdir on |
13 | bigendian architectures. Fix possible memory corruption when | 13 | bigendian architectures. Fix possible memory corruption when |
14 | EAGAIN returned on kern_recvmsg. | 14 | EAGAIN returned on kern_recvmsg. Return better error if server |
15 | requires packet signing but client has disabled it. | ||
15 | 16 | ||
16 | Version 1.50 | 17 | Version 1.50 |
17 | ------------ | 18 | ------------ |
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c index d22af63e8f1f..2b2d4fec3656 100644 --- a/fs/cifs/cifssmb.c +++ b/fs/cifs/cifssmb.c | |||
@@ -663,10 +663,12 @@ signing_check: | |||
663 | /* MUST_SIGN already includes the MAY_SIGN FLAG | 663 | /* MUST_SIGN already includes the MAY_SIGN FLAG |
664 | so if this is zero it means that signing is disabled */ | 664 | so if this is zero it means that signing is disabled */ |
665 | cFYI(1, ("Signing disabled")); | 665 | cFYI(1, ("Signing disabled")); |
666 | if (server->secMode & SECMODE_SIGN_REQUIRED) | 666 | if (server->secMode & SECMODE_SIGN_REQUIRED) { |
667 | cERROR(1, ("Server requires " | 667 | cERROR(1, ("Server requires " |
668 | "packet signing to be enabled in " | 668 | "packet signing to be enabled in " |
669 | "/proc/fs/cifs/SecurityFlags.")); | 669 | "/proc/fs/cifs/SecurityFlags.")); |
670 | rc = -EOPNOTSUPP; | ||
671 | } | ||
670 | server->secMode &= | 672 | server->secMode &= |
671 | ~(SECMODE_SIGN_ENABLED | SECMODE_SIGN_REQUIRED); | 673 | ~(SECMODE_SIGN_ENABLED | SECMODE_SIGN_REQUIRED); |
672 | } else if ((secFlags & CIFSSEC_MUST_SIGN) == CIFSSEC_MUST_SIGN) { | 674 | } else if ((secFlags & CIFSSEC_MUST_SIGN) == CIFSSEC_MUST_SIGN) { |