diff options
author | Aurelien Aptel <aaptel@suse.com> | 2017-02-13 16:19:04 +0100 |
---|---|---|
committer | Steve French <smfrench@gmail.com> | 2017-03-01 22:26:11 -0600 |
commit | b9043cc5b99e9c93596a28647fd9f526f5bfa22c (patch) | |
tree | 3fc233fee754089bf80c8944f0c46880f8c046ee /fs/cifs/smb2pdu.c | |
parent | 7f9f6d2ec51449a20bc35359c9e190bf861b57e1 (diff) | |
download | linux-b9043cc5b99e9c93596a28647fd9f526f5bfa22c.tar.bz2 |
CIFS: set signing flag in SMB2+ TreeConnect if needed
cifs_enable_signing() already sets server->sign according to what the
server requires/offers and what mount options allows/forbids, so use
that.
this is required for IPC tcon that connects to signing-required servers.
Signed-off-by: Aurelien Aptel <aaptel@suse.com>
Acked-by: Pavel Shilovsky <pshilov@microsoft.com>
Signed-off-by: Steve French <smfrench@gmail.com>
Diffstat (limited to 'fs/cifs/smb2pdu.c')
-rw-r--r-- | fs/cifs/smb2pdu.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c index 8c4532dc749f..2fd93eeed15a 100644 --- a/fs/cifs/smb2pdu.c +++ b/fs/cifs/smb2pdu.c @@ -1168,8 +1168,8 @@ SMB2_tcon(const unsigned int xid, struct cifs_ses *ses, const char *tree, /* since no tcon, smb2_init can not do this, so do here */ req->hdr.sync_hdr.SessionId = ses->Suid; - /* if (ses->server->sec_mode & SECMODE_SIGN_REQUIRED) - req->hdr.Flags |= SMB2_FLAGS_SIGNED; */ + if (ses->server->sign) + req->hdr.sync_hdr.Flags |= SMB2_FLAGS_SIGNED; } else if (encryption_required(tcon)) flags |= CIFS_TRANSFORM_REQ; |