Tizen 2.0 Release
[framework/base/acl.git] / man / man3 / acl_create_entry.3
1 .\" Access Control Lists manual pages
2 .\"
3 .\" (C) 2002 Andreas Gruenbacher, <a.gruenbacher@bestbits.at>
4 .\"
5 .\" This is free documentation; you can redistribute it and/or
6 .\" modify it under the terms of the GNU General Public License as
7 .\" published by the Free Software Foundation; either version 2 of
8 .\" the License, or (at your option) any later version.
9 .\"
10 .\" The GNU General Public License's references to "object code"
11 .\" and "executables" are to be interpreted as the output of any
12 .\" document formatting or typesetting system, including
13 .\" intermediate and printed output.
14 .\"
15 .\" This manual is distributed in the hope that it will be useful,
16 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
17 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 .\" GNU General Public License for more details.
19 .\"
20 .\" You should have received a copy of the GNU General Public
21 .\" License along with this manual.  If not, see
22 .\" <http://www.gnu.org/licenses/>.
23 .\"
24 .Dd March 23, 2002
25 .Dt ACL_CREATE_ENTRY 3
26 .Os "Linux ACL"
27 .Sh NAME
28 .Nm acl_create_entry
29 .Nd create a new ACL entry
30 .Sh LIBRARY
31 Linux Access Control Lists library (libacl, \-lacl).
32 .Sh SYNOPSIS
33 .In sys/types.h
34 .In sys/acl.h
35 .Ft int
36 .Fn acl_create_entry "acl_t *acl_p" "acl_entry_t *entry_p"
37 .Sh DESCRIPTION
38 The
39 .Fn acl_create_entry
40 function creates a new ACL entry in the ACL pointed to by the contents of the pointer argument
41 .Va acl_p .
42 On success, the function returns a descriptor for the new
43 ACL entry via
44 .Va entry_p .
45 .Pp
46 This function may cause memory to be allocated.  The caller should free any
47 releasable memory, when the new ACL is no longer required, by calling
48 .Xr acl_free 3
49 with
50 .\" <AG>
51 .\" 1003.1e says:
52 .\" .Va (void*)acl_t
53 .\" this makes no sense, so:
54 .Va (void*)*acl_p
55 .\" </AG>
56 as an argument.
57 If the ACL working storage cannot be increased in the current location,
58 then the working storage for the ACL pointed to by
59 .Va acl_p
60 may be relocated and the previous working storage is released. A pointer to
61 the new working storage is returned via
62 .Va acl_p .
63 .Pp
64 The components of the new ACL entry are initialized in the following ways: the
65 ACL tag type component contains ACL_UNDEFINED_TAG, the qualifier component
66 contains ACL_UNDEFINED_ID, and the set of permissions has no permissions
67 enabled. Any existing ACL entry descriptors that refer to entries in the ACL
68 continue to refer to those entries.
69 .\" <AG>
70 .\" Conflict between requirements:
71 .\" (a) ACL may be relocated,
72 .\" (b) all pointers remain valid.
73 .\" </AG>
74 .Sh RETURN VALUE
75 .Rv -std acl_create_entry
76 .Sh ERRORS
77 If any of the following conditions occur, the
78 .Fn acl_create_entry
79 function returns
80 .Li -1
81 and sets
82 .Va errno
83 to the corresponding value:
84 .Bl -tag -width Er
85 .It Bq Er EINVAL
86 The argument
87 .Va acl_p
88 is not a valid pointer to an ACL.
89 .It Bq Er ENOMEM
90 The ACL working storage requires more memory than is allowed by the hardware or system-imposed memory management constraints.
91 .El
92 .Sh STANDARDS
93 IEEE Std 1003.1e draft 17 (\(lqPOSIX.1e\(rq, abandoned)
94 .Sh SEE ALSO
95 .Xr acl_init 3 ,
96 .Xr acl_delete_entry 3 ,
97 .Xr acl_free 3 ,
98 .Xr acl_create_entry 3 ,
99 .Xr acl 5
100 .Sh AUTHOR
101 Derived from the FreeBSD manual pages written by
102 .An "Robert N M Watson" Aq rwatson@FreeBSD.org ,
103 and adapted for Linux by
104 .An "Andreas Gruenbacher" Aq a.gruenbacher@bestbits.at .