mirror of
https://github.com/samba-team/samba.git
synced 2025-08-30 17:49:30 +03:00
SEC_FILE_READ_ATTRIBUTE is only automatically granted on SMB, not SMB2
(This used to be commit 7bff069142
)
This commit is contained in:
@ -464,7 +464,11 @@ NTSTATUS pvfs_access_check_unix(struct pvfs_state *pvfs,
|
|||||||
return NT_STATUS_ACCESS_DENIED;
|
return NT_STATUS_ACCESS_DENIED;
|
||||||
}
|
}
|
||||||
|
|
||||||
*access_mask |= SEC_FILE_READ_ATTRIBUTE;
|
if (pvfs->ntvfs->ctx->protocol != PROTOCOL_SMB2) {
|
||||||
|
/* on SMB, this bit is always granted, even if not
|
||||||
|
asked for */
|
||||||
|
*access_mask |= SEC_FILE_READ_ATTRIBUTE;
|
||||||
|
}
|
||||||
|
|
||||||
return NT_STATUS_OK;
|
return NT_STATUS_OK;
|
||||||
}
|
}
|
||||||
@ -518,8 +522,11 @@ NTSTATUS pvfs_access_check(struct pvfs_state *pvfs,
|
|||||||
/* check the acl against the required access mask */
|
/* check the acl against the required access mask */
|
||||||
status = sec_access_check(sd, token, *access_mask, access_mask);
|
status = sec_access_check(sd, token, *access_mask, access_mask);
|
||||||
|
|
||||||
/* this bit is always granted, even if not asked for */
|
if (pvfs->ntvfs->ctx->protocol != PROTOCOL_SMB2) {
|
||||||
*access_mask |= SEC_FILE_READ_ATTRIBUTE;
|
/* on SMB, this bit is always granted, even if not
|
||||||
|
asked for */
|
||||||
|
*access_mask |= SEC_FILE_READ_ATTRIBUTE;
|
||||||
|
}
|
||||||
|
|
||||||
talloc_free(acl);
|
talloc_free(acl);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user