Skip to content

Commit 231e2a0

Browse files
committed
smb3: improve check for when we send the security descriptor context on create
We had cases in the previous patch where we were sending the security descriptor context on SMB3 open (file create) in cases when we hadn't mounted with with "modefromsid" mount option. Add check for that mount flag before calling ad_sd_context in open init. Signed-off-by: Steve French <[email protected]> Reviewed-by: Pavel Shilovsky <[email protected]>
1 parent fdef665 commit 231e2a0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

fs/cifs/smb2pdu.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2630,6 +2630,8 @@ SMB2_open_init(struct cifs_tcon *tcon, struct smb_rqst *rqst, __u8 *oplock,
26302630
}
26312631

26322632
if ((oparms->disposition != FILE_OPEN) &&
2633+
(oparms->cifs_sb) &&
2634+
(oparms->cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MODE_FROM_SID) &&
26332635
(oparms->mode != ACL_NO_MODE)) {
26342636
if (n_iov > 2) {
26352637
struct create_context *ccontext =

0 commit comments

Comments
 (0)