From 8ede2acefd1221f9af7c089f8ed4eaeea16409e9 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Sat, 11 Apr 2015 16:03:18 +0200 Subject: [PATCH] Fix typo in new fchmod implementation * fhandler_disk_file.cc (fhandler_disk_file::fchmod): Fix typo in mask computation. Signed-off-by: Corinna Vinschen --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/fhandler_disk_file.cc | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 22d1a8b6b..e300ff6c6 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2015-04-11 Corinna Vinschen + + * fhandler_disk_file.cc (fhandler_disk_file::fchmod): Fix typo in + mask computation. + 2015-04-10 Corinna Vinschen * include/cygwin/version.h (CYGWIN_VERSION_DLL_MAJOR): Bump to 2000. diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc index abc4b4134..2b30801bc 100644 --- a/winsup/cygwin/fhandler_disk_file.cc +++ b/winsup/cygwin/fhandler_disk_file.cc @@ -906,9 +906,9 @@ fhandler_disk_file::fchmod (mode_t mode) aclp[0].a_perm = (mode >> 6) & S_IRWXO; if (nentries > MIN_ACL_ENTRIES && (idx = searchace (aclp, nentries, CLASS_OBJ)) >= 0) - aclp[idx].a_perm = (mode >> 6) & S_IRWXO; + aclp[idx].a_perm = (mode >> 3) & S_IRWXO; else - aclp[1].a_perm = (mode >> 6) & S_IRWXO; + aclp[1].a_perm = (mode >> 3) & S_IRWXO; if ((idx = searchace (aclp, nentries, OTHER_OBJ)) >= 0) aclp[idx].a_perm = mode & S_IRWXO; if (pc.isdir ())