Skip to content

Commit

Permalink
[CIFS] Return better error when server requires signing but client fo…
Browse files Browse the repository at this point in the history
…rbids

Signed-off-by: Steve French <sfrench@us.ibm.com>
  • Loading branch information
Steve French committed Oct 18, 2007
1 parent d628ddb commit abb63d6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion fs/cifs/CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -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
------------
Expand Down
4 changes: 3 additions & 1 deletion fs/cifs/cifssmb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit abb63d6

Please sign in to comment.