1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

More paranoia to ensure SD's can't be set on read-only shares.

Jeremy.
This commit is contained in:
Jeremy Allison 2010-09-09 15:28:43 -07:00
parent 9962462278
commit e6b85c2a7b

View File

@ -836,6 +836,10 @@ NTSTATUS set_sd(files_struct *fsp, uint8_t *data, uint32_t sd_len,
struct security_descriptor *psd = NULL; struct security_descriptor *psd = NULL;
NTSTATUS status; NTSTATUS status;
if (!CAN_WRITE(fsp->conn)) {
return NT_STATUS_ACCESS_DENIED;
}
if (sd_len == 0 || !lp_nt_acl_support(SNUM(fsp->conn))) { if (sd_len == 0 || !lp_nt_acl_support(SNUM(fsp->conn))) {
return NT_STATUS_OK; return NT_STATUS_OK;
} }