strtoacl.3c (2010 09)

s
strtoacl(3C) strtoacl(3C)
NAME
strtoacl( ), strtoaclpatt( ), aclentrystart[ ] - convert string form to access control list (ACL) structure (HFS
File System only)
SYNOPSIS
#include <acllib.h>
int strtoacl(
const char *string,
int nentries,
int maxentries,
struct acl_entry *acl,
uid_t fuid,
gid_t fgid);
int strtoaclpatt(
const char *string,
int maxentries,
struct acl_entry_patt *acl);
int strtoacl_r(
const char *string,
int nentries,
int maxentries,
struct acl_entry *acl,
uid_t fuid,
gid_t fgid,
char *entrystart[]);
int strtoaclpatt_r(
const char *string,
int maxentries,
struct acl_entry_patt *acl
char *entrystart[]);
DESCRIPTION
strtoacl() converts an access control list from exact symbolic (string) representation to structure
form. It parses the input string and verifies its validity. Optionally it applies the entries in the string as
a series of changes to an existing ACL.
strtoaclpatt() converts an access control list pattern from symbolic (string) representation to struc-
ture form. It parses the input string and verifies its validity.
The external array
aclentrystart[]
, only valid until the next call of either routine, is useful for
error reporting. See ERRORS below.
The ‘operator’’ and ‘‘short’’ symbolic forms of ACLs and ACL patterns (described in acl(5)) are acceptable
as input strings. If the first non-whitespace character in string is
(, the ACL or ACL pattern in string
must be in short form. Otherwise operator form is assumed.
strtoacl() takes a pointer to the string to be converted, and a pointer to the first element of an array
of ACL entries (acl[]) initially containing the indicated number (nentries ) of valid entries (zero or
more). This array can grow to the indicated number of entries (maxentries ). strtoacl() also takes
file user ID (fuid) and group ID (fgid) values to substitute for @ characters in string and returns the
resulting number of entries in acl[].
Redundant entries (identical user ID and group ID values after processing
@ characters) are combined, so
that acl[] contains unique entries in the order encountered. If a new entry is mentioned, it is added to
the end of the acl array.
strtoaclpatt( )
strtoaclpatt() differs from strtoacl() because it processes an ACL pattern instead of an ACL.
Since modification of an existing initial ACL is not useful, it is not supported.
Entries with matching user and group ID values are not combined. Each entry input yields one entry in
the returned array.
HP-UX 11i Version 3: September 2010 1 Hewlett-Packard Company 1

Summary of content (6 pages)