1.5.20: Fix for parsing ACL entries with aclfromtext32() in sec_acl.cc

Silvio Laguzzi slaguzzi@data-al.de
Thu Jul 20 07:26:00 GMT 2006


Hi, all

when parsing ACL entries from an input string with aclfromtext32() the
ACL rights follow at different position after the ACL entry tags like 
default:user, user, group, mask and so on. For almost all of the tags 
this position was not handled correctly.


With the supplied patch you can now parse an input string with
char *
aclfromtext32(char *acltextp, int *aclcnt)
that holds abbreviated ACL entry tags like under SunOS.

I've taken the previously unused int * parameter of this function to 
return the number of correctly parsed ACL entries confirming to Sun's 
manpage.

Here's the new input format of acltextp buffer:

<acl_entry>[,<acl_entry>]*

where <acl_entry> can be either one of:

u[ser]:[id|username]:rwx
g[roup]:[id|groupname]:rwx
o[ther]::rwx
m[ask]::rwx

or one of the default ACL entries:
d[efault]:u[ser]:[id|username]:rwx
d[efault]:g[roup]:[id|groupname]:rwx
d[efault]:o[ther]::rwx
d[efault]:m[ask]::rwx


In acltotext32() I've added a colon between 'default' and the rest of an 
ACL entry type so that the output string has the same format like under 
SunOS and Linux.

Therefore default entry types are now exported as

default:user:[id]:rwx,
default:group:[id]:rwx,
default:mask::rwx,
default:other::rwx,


Best regards,

Silvio Laguzzi

---
Silvio Laguzzi
Zimmer-AL GmbH
Junkersstrasse 9
D-89231 Neu-Ulm
http://www.data-al.de
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: sec_acl.patch
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20060720/0f61538a/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ChangeLog
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20060720/0f61538a/attachment-0001.ksh>


More information about the Cygwin-patches mailing list