diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2005-12-21 13:37:28 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2005-12-21 13:37:28 +0000 |
commit | 2df1714182374572c7600c00c30ab4d2cc2f1d02 (patch) | |
tree | 9e9f0e72e79a89882b661c1c6068dc31e6edd9d6 | |
parent | 0786c42a9ce31bfbd48b8887e509dab09a6974a0 (diff) | |
download | newlib-2df1714182374572c7600c00c30ab4d2cc2f1d02.zip newlib-2df1714182374572c7600c00c30ab4d2cc2f1d02.tar.gz newlib-2df1714182374572c7600c00c30ab4d2cc2f1d02.tar.bz2 |
* (fhandler_disk_file::fchown): Remove execute bits from "sensible"
permissions. Use same setting as in symlink.
-rw-r--r-- | winsup/cygwin/ChangeLog | 5 | ||||
-rw-r--r-- | winsup/cygwin/fhandler_disk_file.cc | 8 |
2 files changed, 7 insertions, 6 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 256788d..f4b9b1c 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,5 +1,10 @@ 2005-12-21 Corinna Vinschen <corinna@vinschen.de> + * (fhandler_disk_file::fchown): Remove execute bits from "sensible" + permissions. Use same setting as in symlink. + +2005-12-21 Corinna Vinschen <corinna@vinschen.de> + * fhandler_disk_file.cc (fhandler_base::fstat_helper): Fix inode number debug output. (fhandler_disk_file::fchown): Always set sensible permission values diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc index d8fc42b..66585f0 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); } |