Cygwin: fix permission problem when writing DAC info on Samba shares
Cygwin always requests FILE_WRITE_ATTRIBUTES permissions when trying to change DAC information. This can lead to permission problems when trying to chmod/chown files on Samba shares. Drop requesting FILE_WRITE_ATTRIBUTES on Samba shares and go with WRITE_DAC/WRITE_OWNER only. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
parent
bd4eaebb6f
commit
0390cc8572
|
@ -561,10 +561,12 @@ fhandler_base::open (int flags, mode_t mode)
|
|||
access = READ_CONTROL | FILE_READ_ATTRIBUTES;
|
||||
break;
|
||||
case query_write_control:
|
||||
access = READ_CONTROL | WRITE_OWNER | WRITE_DAC | FILE_WRITE_ATTRIBUTES;
|
||||
access = READ_CONTROL | WRITE_OWNER | WRITE_DAC
|
||||
| (pc.fs_is_samba () ? 0 : FILE_WRITE_ATTRIBUTES);
|
||||
break;
|
||||
case query_write_dac:
|
||||
access = READ_CONTROL | WRITE_DAC | FILE_WRITE_ATTRIBUTES;
|
||||
access = READ_CONTROL | WRITE_DAC
|
||||
| (pc.fs_is_samba () ? 0 : FILE_WRITE_ATTRIBUTES);
|
||||
break;
|
||||
case query_write_attributes:
|
||||
access = READ_CONTROL | FILE_WRITE_ATTRIBUTES;
|
||||
|
|
|
@ -6,3 +6,5 @@ Bug Fixes
|
|||
|
||||
- Fix a float rounding issue in newlib.
|
||||
Addresses: https://sourceware.org/pipermail/newlib/2021/018626.html
|
||||
|
||||
- Fix a permission problem when writing ACLs on Samba.
|
||||
|
|
Loading…
Reference in New Issue