This is the mail archive of the cygwin-patches 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]

[PATCH] Fix permissions of DEF_CLASS_OBJ ACL entry


Cygwin returns permissions 0777 in the DEF_CLASS_OBJ ("default:mask:") ACL entry. This patch changes this to 07. The upper bits 0770 probably do not make any sense here.

The value 0777 is one reason why rsync may set bogus permissions.
(The other reason is that rsync always expects a DEF_OTHER_OBJ entry. This is likely a rsync bug which should be fixed upstream)
See http://cygwin.com/ml/cygwin/2010-11/msg00429.html


Christian

2010-12-07  Christian Franke  <franke@computer.org>

	* sec_acl.cc (getacl): Set DEF_CLASS_OBJ permissions
	to 07 instead of 0777.


diff --git a/winsup/cygwin/sec_acl.cc b/winsup/cygwin/sec_acl.cc
index 0c6586b..24f2468 100644
--- a/winsup/cygwin/sec_acl.cc
+++ b/winsup/cygwin/sec_acl.cc
@@ -394,7 +394,7 @@ getacl (HANDLE handle, path_conv &pc, int nentries, __aclent32_t *aclbufp)
 	{
 	  lacl[pos].a_type = DEF_CLASS_OBJ;
 	  lacl[pos].a_id = ILLEGAL_GID;
-	  lacl[pos].a_perm = S_IRWXU | S_IRWXG | S_IRWXO;
+	  lacl[pos].a_perm = S_IROTH | S_IWOTH | S_IXOTH;
 	}
     }
   if ((pos = searchace (lacl, MAX_ACL_ENTRIES, 0)) < 0)

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