mirror of
https://github.com/samba-team/samba.git
synced 2025-02-28 01:58:17 +03:00
s3: For read-only shares, filter out write bits from conn->access_mask
Signed-off-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Sep 27 02:51:42 CEST 2012 on sn-devel-104
This commit is contained in:
parent
4666dec416
commit
4544c52fc4
@ -524,6 +524,13 @@ static void create_share_access_mask(connection_struct *conn, int snum)
|
||||
MAXIMUM_ALLOWED_ACCESS,
|
||||
&conn->share_access);
|
||||
|
||||
if (!CAN_WRITE(conn)) {
|
||||
conn->share_access &=
|
||||
~(SEC_FILE_WRITE_DATA | SEC_FILE_APPEND_DATA |
|
||||
SEC_FILE_WRITE_EA | SEC_FILE_WRITE_ATTRIBUTE |
|
||||
SEC_DIR_DELETE_CHILD );
|
||||
}
|
||||
|
||||
if (security_token_has_privilege(token, SEC_PRIV_SECURITY)) {
|
||||
conn->share_access |= SEC_FLAG_SYSTEM_SECURITY;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user