Skip to content

Commit

Permalink
[CIFS] Missing flags2 for DFS
Browse files Browse the repository at this point in the history
Partly suggested by Igor Mammedov

Signed-off-by: Steve French <sfrench@us.ibm.com>
  • Loading branch information
Steve French committed Oct 12, 2006
1 parent d103e16 commit 1a4e15a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
8 changes: 8 additions & 0 deletions fs/cifs/cifssmb.c
Original file line number Diff line number Diff line change
Expand Up @@ -3675,6 +3675,14 @@ CIFSGetDFSRefer(const int xid, struct cifsSesInfo *ses,
strncpy(pSMB->RequestFileName, searchName, name_len);
}

if(ses->server) {
if(ses->server->secMode &
(SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED))
pSMB->hdr.Flags2 |= SMBFLG2_SECURITY_SIGNATURE;
}

pSMB->hdr.Uid = ses->Suid;

params = 2 /* level */ + name_len /*includes null */ ;
pSMB->TotalDataCount = 0;
pSMB->DataCount = 0;
Expand Down
4 changes: 3 additions & 1 deletion fs/cifs/connect.c
Original file line number Diff line number Diff line change
Expand Up @@ -3219,7 +3219,9 @@ CIFSTCon(unsigned int xid, struct cifsSesInfo *ses,
}
/* else do not bother copying these informational fields */
}
if(smb_buffer_response->WordCount == 3)
if((smb_buffer_response->WordCount == 3) ||
(smb_buffer_response->WordCount == 7))
/* field is in same location */
tcon->Flags = le16_to_cpu(pSMBr->OptionalSupport);
else
tcon->Flags = 0;
Expand Down

0 comments on commit 1a4e15a

Please sign in to comment.