Skip to content

Commit

Permalink
smb3: improve check for when we send the security descriptor context …
Browse files Browse the repository at this point in the history
…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]>
  • Loading branch information
Steve French committed Dec 7, 2019
1 parent fdef665 commit 231e2a0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fs/cifs/smb2pdu.c
Original file line number Diff line number Diff line change
Expand Up @@ -2630,6 +2630,8 @@ SMB2_open_init(struct cifs_tcon *tcon, struct smb_rqst *rqst, __u8 *oplock,
}

if ((oparms->disposition != FILE_OPEN) &&
(oparms->cifs_sb) &&
(oparms->cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MODE_FROM_SID) &&
(oparms->mode != ACL_NO_MODE)) {
if (n_iov > 2) {
struct create_context *ccontext =
Expand Down

0 comments on commit 231e2a0

Please sign in to comment.