Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=abb63d6c3d3d0e4d93b63589135962091154be9b
Commit:     abb63d6c3d3d0e4d93b63589135962091154be9b
Parent:     d628ddb62d3050e8e474aa3566bc6bafbe4b9c26
Author:     Steve French <[EMAIL PROTECTED]>
AuthorDate: Thu Oct 18 02:58:40 2007 +0000
Committer:  Steve French <[EMAIL PROTECTED]>
CommitDate: Thu Oct 18 02:58:40 2007 +0000

    [CIFS] Return better error when server requires signing but client forbids
    
    Signed-off-by: Steve French <[EMAIL PROTECTED]>
---
 fs/cifs/CHANGES   |    3 ++-
 fs/cifs/cifssmb.c |    4 +++-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/fs/cifs/CHANGES b/fs/cifs/CHANGES
index 2459ef0..3d41916 100644
--- a/fs/cifs/CHANGES
+++ b/fs/cifs/CHANGES
@@ -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
 ------------
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
index d22af63..2b2d4fe 100644
--- a/fs/cifs/cifssmb.c
+++ b/fs/cifs/cifssmb.c
@@ -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) {
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to