aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/smb2pdu.c
diff options
context:
space:
mode:
authorSteve French <smfrench@gmail.com>2013-06-26 20:14:55 -0400
committerSteve French <smfrench@gmail.com>2013-06-26 20:14:55 -0400
commitf87ab88b4065a9ef00620224c4fafadc201a430c (patch)
treeb36ffae887d6dce6a75d185b71d2bef12f5a802f /fs/cifs/smb2pdu.c
parent84ceeb9626655ce7c2745f724571ca8008b4695e (diff)
[CIFS] Do not set DFS flag on SMB2 open
If we would set SMB2_FLAGS_DFS_OPERATIONS on open we also would have to pass the path on the Open SMB prefixed by \\server\share. Not sure when we would need to do the augmented path (if ever) and setting this flag breaks the SMB2 open operation since it is illegal to send an empty path name (without \\server\share prefix) when the DFS flag is set in the SMB open header. We could consider setting the flag on all operations other than open but it is safer to net set it for now. Signed-off-by: Steve French <smfrench@gmail.com>
Diffstat (limited to 'fs/cifs/smb2pdu.c')
-rw-r--r--fs/cifs/smb2pdu.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c
index 53275bf1e0a8..2b312e4eeaa6 100644
--- a/fs/cifs/smb2pdu.c
+++ b/fs/cifs/smb2pdu.c
@@ -120,13 +120,20 @@ smb2_hdr_assemble(struct smb2_hdr *hdr, __le16 smb2_cmd /* command */ ,
120 /* Uid is not converted */ 120 /* Uid is not converted */
121 if (tcon->ses) 121 if (tcon->ses)
122 hdr->SessionId = tcon->ses->Suid; 122 hdr->SessionId = tcon->ses->Suid;
123 /* BB check following DFS flags BB */ 123
124 /* BB do we have to add check for SHI1005_FLAGS_DFS_ROOT too? */ 124 /*
125 if (tcon->share_flags & SHI1005_FLAGS_DFS) 125 * If we would set SMB2_FLAGS_DFS_OPERATIONS on open we also would have
126 hdr->Flags |= SMB2_FLAGS_DFS_OPERATIONS; 126 * to pass the path on the Open SMB prefixed by \\server\share.
127 /* BB how does SMB2 do case sensitive? */ 127 * Not sure when we would need to do the augmented path (if ever) and
128 /* if (tcon->nocase) 128 * setting this flag breaks the SMB2 open operation since it is
129 hdr->Flags |= SMBFLG_CASELESS; */ 129 * illegal to send an empty path name (without \\server\share prefix)
130 * when the DFS flag is set in the SMB open header. We could
131 * consider setting the flag on all operations other than open
132 * but it is safer to net set it for now.
133 */
134/* if (tcon->share_flags & SHI1005_FLAGS_DFS)
135 hdr->Flags |= SMB2_FLAGS_DFS_OPERATIONS; */
136
130 if (tcon->ses && tcon->ses->server && tcon->ses->server->sign) 137 if (tcon->ses && tcon->ses->server && tcon->ses->server->sign)
131 hdr->Flags |= SMB2_FLAGS_SIGNED; 138 hdr->Flags |= SMB2_FLAGS_SIGNED;
132out: 139out: