1acltotext(3SEC)      File Access Control Library Functions     acltotext(3SEC)
2
3
4

NAME

6       acltotext,  aclfromtext  -  convert  internal representation to or from
7       external representation
8

SYNOPSIS

10       cc [ flag... ] file... -lsec [ library... ]
11       #include <sys/acl.h>
12
13       char *acltotext(aclent_t *aclbufp, int aclcnt);
14
15
16       aclent_t *aclfromtext(char *acltextp, int *aclcnt);
17
18

DESCRIPTION

20       The  acltotext()  function  converts  an  internal  ACL  representation
21       pointed  to  by  aclbufp into an external ACL representation. The space
22       for the external text string is obtained using malloc(3C).  The  caller
23       is responsible for freeing the space upon completion..
24
25
26       The  aclfromtext()  function  converts  an  external ACL representation
27       pointed to by acltextp into an internal ACL representation.  The  space
28       for the list of ACL entries is obtained using malloc(3C). The caller is
29       responsible for freeing the space upon completion. The aclcnt  argument
30       indicates the number of ACL entries found.
31
32
33       An external ACL representation is defined as follows:
34
35
36       <acl_entry>[,<acl_entry>]...
37
38
39       Each <acl_entry> contains one ACL entry. The external representation of
40       an ACL entry contains two or three colon-separated  fields.  The  first
41       field  contains  the  ACL  entry  tag type. The entry type keywords are
42       defined as:
43
44       user             This ACL entry with no UID specified in the ACL  entry
45                        ID  field specifies the access granted to the owner of
46                        the object. Otherwise, this ACL  entry  specifies  the
47                        access granted to a specific user-name or user-id num‐
48                        ber.
49
50
51       group            This ACL entry with no GID specified in the ACL  entry
52                        ID  field  specifies  the access granted to the owning
53                        group of the object. Otherwise, this ACL entry  speci‐
54                        fies  the  access  granted to a specific group-name or
55                        group-id number.
56
57
58       other            This ACL entry specifies the  access  granted  to  any
59                        user or group that does not match any other ACL entry.
60
61
62       mask             This ACL entry specifies the maximum access granted to
63                        user or group entries.
64
65
66       default:user     This ACL entry with no uid specified in the ACL  entry
67                        ID  field  specifies the default access granted to the
68                        owner of the object. Otherwise, this ACL entry  speci‐
69                        fies  the  default  access granted to a specific user-
70                        name or user-ID number.
71
72
73       default:group    This ACL entry with no gid specified in the ACL  entry
74                        ID  field  specifies the default access granted to the
75                        owning group of the object. Otherwise, this ACL  entry
76                        specifies  the  default  access  granted to a specific
77                        group-name or group-ID number.
78
79
80       default:other    This ACL entry specifies the default access for  other
81                        entry.
82
83
84       default:mask     This  ACL  entry specifies the default access for mask
85                        entry.
86
87
88
89       The second field contains the ACL entry ID, as follows:
90
91       uid      This field specifies a user-name, or user-ID if  there  is  no
92                user-name associated with the user-ID number.
93
94
95       gid      This  field specifies a group-name, or group-ID if there is no
96                group-name associated with the group-ID number.
97
98
99       empty    This field is used by the user and group ACL entry types.
100
101
102
103       The third field contains the following  symbolic  discretionary  access
104       permissions:
105
106       r        read permission
107
108
109       w        write permission
110
111
112       x        execute/search permission
113
114
115       no access
116
117

RETURN VALUES

119       Upon  successful completion, the acltotext() function returns a pointer
120       to a text string. Otherwise, it returns NULL.
121
122
123       Upon  successful  completion,  the  aclfromtext()  function  returns  a
124       pointer to a list of ACL entries. Otherwise, it returns NULL.
125

ATTRIBUTES

127       See attributes(5) for descriptions of the following attributes:
128
129
130
131
132       ┌─────────────────────────────┬─────────────────────────────┐
133       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
134       ├─────────────────────────────┼─────────────────────────────┤
135       │Interface Stability          │Evolving                     │
136       ├─────────────────────────────┼─────────────────────────────┤
137       │MT-Level                     │Unsafe                       │
138       └─────────────────────────────┴─────────────────────────────┘
139

SEE ALSO

141       acl(2), malloc(3C), attributes(5)
142
143
144
145SunOS 5.11                        10 Dec 2001                  acltotext(3SEC)
Impressum