diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 256788da6..f4b9b1c86 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2005-12-21 Corinna Vinschen + + * (fhandler_disk_file::fchown): Remove execute bits from "sensible" + permissions. Use same setting as in symlink. + 2005-12-21 Corinna Vinschen * fhandler_disk_file.cc (fhandler_base::fstat_helper): Fix inode number diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc index d8fc42b42..66585f00f 100644 --- a/winsup/cygwin/fhandler_disk_file.cc +++ b/winsup/cygwin/fhandler_disk_file.cc @@ -569,13 +569,9 @@ fhandler_disk_file::fchown (__uid32_t uid, __gid32_t gid) new ACL with these useless permissions results in a potentially broken symlink. So what we do here is to set the underlying permissions of symlinks to a sensible value which allows the - world to read the symlink and only the new owner to change it. - As for the execute permissions... they *seem* to be not - necessary, but for the sake of comleteness and to avoid - struggling with yet another Windows weirdness, the execute bits - are added as well. */ + world to read the symlink and only the new owner to change it. */ if (pc.issymlink ()) - attrib = S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH; + attrib = S_IFLNK | STD_RBITS | STD_WBITS; res = set_file_attribute (pc.has_acls (), get_io_handle (), pc, uid, gid, attrib); }