]> err.no Git - linux-2.6/commitdiff
[CIFS] Return better error when server requires signing but client forbids
authorSteve French <sfrench@us.ibm.com>
Thu, 18 Oct 2007 02:58:40 +0000 (02:58 +0000)
committerSteve French <sfrench@us.ibm.com>
Thu, 18 Oct 2007 02:58:40 +0000 (02:58 +0000)
Signed-off-by: Steve French <sfrench@us.ibm.com>
fs/cifs/CHANGES
fs/cifs/cifssmb.c

index 2459ef0a1396784d0f9f1280b3fc1e04267ade77..3d419163c3d3a345f0a3bd06b230f0186038d60b 100644 (file)
@@ -11,7 +11,8 @@ connect fails (e.g. due to signing negotiation failure) fix
 leak that causes cifsd not to stop and rmmod to fail to cleanup
 cifs_request_buffers pool. Fix problem with POSIX Open/Mkdir on
 bigendian architectures. Fix possible memory corruption when
-EAGAIN returned on kern_recvmsg.
+EAGAIN returned on kern_recvmsg. Return better error if server
+requires packet signing but client has disabled it.
 
 Version 1.50
 ------------
index d22af63e8f1facd7b9513293e810bf05a053956e..2b2d4fec3656f20e77b5ea124043965870cf9c29 100644 (file)
@@ -663,10 +663,12 @@ signing_check:
                /* MUST_SIGN already includes the MAY_SIGN FLAG
                   so if this is zero it means that signing is disabled */
                cFYI(1, ("Signing disabled"));
-               if (server->secMode & SECMODE_SIGN_REQUIRED)
+               if (server->secMode & SECMODE_SIGN_REQUIRED) {
                        cERROR(1, ("Server requires "
                                   "packet signing to be enabled in "
                                   "/proc/fs/cifs/SecurityFlags."));
+                       rc = -EOPNOTSUPP;
+               }
                server->secMode &=
                        ~(SECMODE_SIGN_ENABLED | SECMODE_SIGN_REQUIRED);
        } else if ((secFlags & CIFSSEC_MUST_SIGN) == CIFSSEC_MUST_SIGN) {