1.5.20: acltotext32 - fix of error when handling default ACL types
Tue Jul 18 14:16:00 GMT 2006
On Jul 18 14:31, Silvio Laguzzi wrote:
> I tracked down the problem to the implementation of
> acltotext32 (__aclent32_t *aclbufp, int aclcnt) in
> The prefix "default" was correctly added to the output string in buf for
> a default ACL entry type.
> But the following switch(aclbuf[pos].a_type) statement did not handle
> these default ACL entry types and stopped with EINVAL.
> I changed line 731 in sec_acl.cc to
> switch(aclbuf[pos].a_type & ~ACL_DEFAULT)
> and everything went fine.
> An unified diff for the code, the output of the 'cygcheck -s -v -r'
> command and the corresponding ChangeLog is included in this message.
> I hope that this fix may contribute to improve Win32 ACL handling under
> --- cygwin-snapshot-20060714-1/winsup/cygwin/sec_acl-orig.cc 2005-06-07 21:42:06.000000000 +0200
> +++ cygwin-snapshot-20060714-1/winsup/cygwin/sec_acl.cc 2006-07-18 12:50:47.812500000 +0200
> @@ -728,7 +728,7 @@ acltotext32 (__aclent32_t *aclbufp, int
> first = false;
> if (aclbufp[pos].a_type & ACL_DEFAULT)
> strcat (buf, "default");
> - switch (aclbufp[pos].a_type)
> + switch (aclbufp[pos].a_type & ~ACL_DEFAULT)
> case USER_OBJ:
> __small_sprintf (buf + strlen (buf), "user::%s",
> 2006-07-18 Silvio Laguzzi <email@example.com>
> * sec_acl.cc (acltotext32): Add missing handling of default ACL entry
Applied. Thanks for the patch.
I assume this was accidentally but please don't attach *all* of the
ChangeLog file, just your single entry. You can also entirely
drop the cygcheck output when sending patches to this list. The
cygcheck output is only for analyzing problem reports on the cygwin ML.
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader cygwin AT cygwin DOT com
More information about the Cygwin-patches