This is the mail archive of the cygwin-cvs@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[newlib-cygwin] Fix typo in new fchmod implementation


https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=8ede2acefd1221f9af7c089f8ed4eaeea16409e9

commit 8ede2acefd1221f9af7c089f8ed4eaeea16409e9
Author: Corinna Vinschen <corinna@vinschen.de>
Date:   Sat Apr 11 16:03:18 2015 +0200

    Fix typo in new fchmod implementation
    
    	* fhandler_disk_file.cc (fhandler_disk_file::fchmod): Fix typo in
    	mask computation.
    
    Signed-off-by: Corinna Vinschen <corinna@vinschen.de>

Diff:
---
 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 22d1a8b..e300ff6 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,8 @@
+2015-04-11  Corinna Vinschen  <corinna@vinschen.de>
+
+	* fhandler_disk_file.cc (fhandler_disk_file::fchmod): Fix typo in
+	mask computation.
+
 2015-04-10  Corinna Vinschen  <corinna@vinschen.de>
 
 	* 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 abc4b41..2b30801 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 ())


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]