diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2015-12-24 00:24:39 +0100 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2015-12-24 00:24:39 +0100 |
commit | 62fe4404a70c7765973141e8921b06a03b7c1c79 (patch) | |
tree | 6c59ce3d145db7ef02cd1b67962f259604333303 | |
parent | ad7b3cde9c157f2c34a6a1296e0bda1ad0975bda (diff) | |
download | newlib-62fe4404a70c7765973141e8921b06a03b7c1c79.zip newlib-62fe4404a70c7765973141e8921b06a03b7c1c79.tar.gz newlib-62fe4404a70c7765973141e8921b06a03b7c1c79.tar.bz2 |
sec_acl.cc: Cosmetic changes
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
-rw-r--r-- | winsup/cygwin/ChangeLog | 4 | ||||
-rw-r--r-- | winsup/cygwin/sec_acl.cc | 28 |
2 files changed, 18 insertions, 14 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 3dad5bc..5f9eacf 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,7 @@ +2015-12-24 Corinna Vinschen <corinna@vinschen.de> + + * sec_acl.cc: Cosmetic changes. + 2015-12-18 Corinna Vinschen <corinna@vinschen.de> * strfuncs.cc (sys_cp_wcstombs): Delete and move functionality into diff --git a/winsup/cygwin/sec_acl.cc b/winsup/cygwin/sec_acl.cc index 5b1705e..dd75e32 100644 --- a/winsup/cygwin/sec_acl.cc +++ b/winsup/cygwin/sec_acl.cc @@ -1,4 +1,4 @@ -/* sec_acl.cc: Sun compatible ACL functions. +/* sec_acl.cc: Solaris compatible ACL functions. Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2014, 2015 Red Hat, Inc. @@ -96,18 +96,6 @@ details. */ | CYG_ACE_MASK_VALID) #define CYG_ACE_NEW_STYLE READ_CONTROL /* New style if set. */ -int -searchace (aclent_t *aclp, int nentries, int type, uid_t id) -{ - int i; - - for (i = 0; i < nentries; ++i) - if ((aclp[i].a_type == type && (id == ILLEGAL_UID || aclp[i].a_id == id)) - || !aclp[i].a_type) - return i; - return -1; -} - /* Define own bit masks rather than using the GENERIC masks. The latter also contain standard rights, which we don't need here. */ #define FILE_ALLOW_READ (FILE_READ_DATA | FILE_READ_ATTRIBUTES | \ @@ -124,6 +112,18 @@ searchace (aclent_t *aclp, int nentries, int type, uid_t id) #define STD_RIGHTS_OTHER (STANDARD_RIGHTS_READ | SYNCHRONIZE) #define STD_RIGHTS_OWNER (STANDARD_RIGHTS_ALL | SYNCHRONIZE) +int +searchace (aclent_t *aclp, int nentries, int type, uid_t id) +{ + int i; + + for (i = 0; i < nentries; ++i) + if ((aclp[i].a_type == type && (id == ILLEGAL_UID || aclp[i].a_id == id)) + || !aclp[i].a_type) + return i; + return -1; +} + /* From the attributes and the POSIX ACL list, compute a new-style Cygwin security descriptor. The function returns a pointer to the SECURITY_DESCRIPTOR in sd_ret, or NULL if the function fails. @@ -1705,7 +1705,7 @@ acltotext (__aclent16_t *aclbufp, int aclcnt) } extern "C" __aclent16_t * -aclfromtext (char *acltextp, int * aclcnt) +aclfromtext (char *acltextp, int *aclcnt) { return (__aclent16_t *) aclfromtext32 (acltextp, aclcnt); } |