From 45794a4270aaa59f6e9482339fcd2928a7b9985b Mon Sep 17 00:00:00 2001 From: Steve French Date: Thu, 18 Oct 2007 02:58:40 +0000 Subject: [PATCH] --- yaml --- r: 71588 b: refs/heads/master c: abb63d6c3d3d0e4d93b63589135962091154be9b h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/cifs/CHANGES | 3 ++- trunk/fs/cifs/cifssmb.c | 4 +++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 49427d4693ae..cff22d26db1c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: d628ddb62d3050e8e474aa3566bc6bafbe4b9c26 +refs/heads/master: abb63d6c3d3d0e4d93b63589135962091154be9b diff --git a/trunk/fs/cifs/CHANGES b/trunk/fs/cifs/CHANGES index 2459ef0a1396..3d419163c3d3 100644 --- a/trunk/fs/cifs/CHANGES +++ b/trunk/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/trunk/fs/cifs/cifssmb.c b/trunk/fs/cifs/cifssmb.c index d22af63e8f1f..2b2d4fec3656 100644 --- a/trunk/fs/cifs/cifssmb.c +++ b/trunk/fs/cifs/cifssmb.c @@ -663,10 +663,12 @@ CIFSSMBNegotiate(unsigned int xid, struct cifsSesInfo *ses) /* 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) {