summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/fhandler_disk_file.cc
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2005-12-21 13:37:28 +0000
committerCorinna Vinschen <corinna@vinschen.de>2005-12-21 13:37:28 +0000
commit2df1714182374572c7600c00c30ab4d2cc2f1d02 (patch)
tree9e9f0e72e79a89882b661c1c6068dc31e6edd9d6 /winsup/cygwin/fhandler_disk_file.cc
parent0786c42a9ce31bfbd48b8887e509dab09a6974a0 (diff)
downloadcygnal-2df1714182374572c7600c00c30ab4d2cc2f1d02.tar.gz
cygnal-2df1714182374572c7600c00c30ab4d2cc2f1d02.tar.bz2
cygnal-2df1714182374572c7600c00c30ab4d2cc2f1d02.zip
* (fhandler_disk_file::fchown): Remove execute bits from "sensible"
permissions. Use same setting as in symlink.
Diffstat (limited to 'winsup/cygwin/fhandler_disk_file.cc')
-rw-r--r--winsup/cygwin/fhandler_disk_file.cc8
1 files changed, 2 insertions, 6 deletions
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);
}