Prepares for adjusting the permission when the FILE_ATTRIBUTE_READONLY is set in
the next commmit.
No change in behaviour.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=16030
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
}
}
+ if (!CAN_WRITE(fsp->conn)) {
+ *p_access_mask &= ~(FILE_GENERIC_WRITE | DELETE_ACCESS);
+ }
+
dosattrs = fdos_mode(fsp);
- if ((dosattrs & FILE_ATTRIBUTE_READONLY) || !CAN_WRITE(fsp->conn)) {
+ if (dosattrs & FILE_ATTRIBUTE_READONLY) {
*p_access_mask &= ~(FILE_GENERIC_WRITE | DELETE_ACCESS);
}