diff options
author | Matt Barden <mbarden@tintri.com> | 2021-03-26 17:24:37 -0400 |
---|---|---|
committer | Matt Barden <mbarden@tintri.com> | 2022-10-13 15:55:08 -0400 |
commit | 5cfb18f0d1f59686e64a1bf142efa2bf653d86a0 (patch) | |
tree | af420f6fd43ca630d9f355a490e077ce8125dea5 | |
parent | 34b17f87fc4c121059d3ab4102a276cbe7ed609a (diff) | |
download | illumos-joyent-5cfb18f0d1f59686e64a1bf142efa2bf653d86a0.tar.gz |
15032 SMB: Can't create a file with a NULL DACL
Reviewed by: Gordon Ross <gordon.w.ross@gmail.com>
Reviewed by: Toomas Soome <tsoome@me.com>
Reviewed by: Prashanth Badari <prbadari@tintri.com>
Approved by: Dan McDonald <danmcd@mnx.io>
-rw-r--r-- | usr/src/uts/common/fs/smbsrv/smb_sd.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/usr/src/uts/common/fs/smbsrv/smb_sd.c b/usr/src/uts/common/fs/smbsrv/smb_sd.c index 946503fa8f..b5dc88db58 100644 --- a/usr/src/uts/common/fs/smbsrv/smb_sd.c +++ b/usr/src/uts/common/fs/smbsrv/smb_sd.c @@ -89,6 +89,9 @@ smb_sd_len(smb_sd_t *sd, uint32_t secinfo) * * Return the security information mask for the specified security * descriptor. + * + * Note: This is used for 'create-with-sd'. 'set-security-info' provides the + * secinfo as part of the request, but create does not, so we must infer it. */ uint32_t smb_sd_get_secinfo(smb_sd_t *sd) @@ -104,10 +107,10 @@ smb_sd_get_secinfo(smb_sd_t *sd) if (sd->sd_group) sec_info |= SMB_GROUP_SECINFO; - if (sd->sd_dacl) + if ((sd->sd_control & SE_DACL_PRESENT) != 0) sec_info |= SMB_DACL_SECINFO; - if (sd->sd_sacl) + if ((sd->sd_control & SE_SACL_PRESENT) != 0) sec_info |= SMB_SACL_SECINFO; return (sec_info); |