diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 3bddc68fb..546df2489 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,9 @@ +2015-12-25 Corinna Vinschen + + * fhandler_disk_file.cc (fhandler_disk_file::fchmod): Only request + query_write_dac rather than query_write_control access when writing + an ACL. Fix a comment. + 2015-12-24 Corinna Vinschen * sec_acl.cc (__aclcalcmask): New function to recalculate ACL masks. diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc index 1dd1b8cbf..4ee67e20d 100644 --- a/winsup/cygwin/fhandler_disk_file.cc +++ b/winsup/cygwin/fhandler_disk_file.cc @@ -742,7 +742,7 @@ fhandler_disk_file::fchmod (mode_t mode) query_open (query_write_dac); if (!(oret = open (O_BINARY, 0))) { - /* Need WRITE_DAC|WRITE_OWNER to write ACLs. */ + /* Need WRITE_DAC to write ACLs. */ if (pc.has_acls ()) return -1; /* Otherwise FILE_WRITE_ATTRIBUTES is sufficient. */ @@ -1021,7 +1021,7 @@ cant_access_acl: if ((cmd == SETACL && !get_handle ()) || (cmd != SETACL && !get_stat_handle ())) { - query_open (cmd == SETACL ? query_write_control : query_read_control); + query_open (cmd == SETACL ? query_write_dac : query_read_control); if (!(oret = open (O_BINARY, 0))) { if (cmd == GETACL || cmd == GETACLCNT)