1ACL_INIT(3) BSD Library Functions Manual ACL_INIT(3)
2
4 acl_init — initialize ACL working storage
5
7 Linux Access Control Lists library (libacl, -lacl).
8
10 #include <sys/types.h>
11 #include <sys/acl.h>
12
13 acl_t
14 acl_init(int count);
15
17 The acl_init() function allocates and initializes the working storage for
18 an ACL of at least count ACL entries. The ACL created initially contains
19 no ACL entries. A pointer to the working storage is returned.
20
21 This function may cause memory to be allocated. The caller should free
22 any releasable memory, when the new ACL is no longer required, by calling
23 acl_free(3) with the (void*)acl_t returned by acl_init() as an argument.
24
26 On success, this function returns a pointer to the working storage. On
27 error, a value of (acl_t)NULL is returned, and errno is set appropri‐
28 ately.
29
31 If any of the following conditions occur, the acl_init() function returns
32 a value of (acl_t)NULL and sets errno to the corresponding value:
33
34 [EINVAL] The value of count is less than zero.
35
36 [ENOMEM] The acl_t to be returned requires more memory than is
37 allowed by the hardware or system-imposed memory man‐
38 agement constraints.
39
41 IEEE Std 1003.1e draft 17 (“POSIX.1e”, abandoned)
42
44 acl_get_file(3), acl_free(3), acl(5)
45
47 Derived from the FreeBSD manual pages written by Robert N M Watson
48 <rwatson@FreeBSD.org>, and adapted for Linux by Andreas Gruenbacher
49 <andreas.gruenbacher@gmail.com>.
50
51Linux ACL March 23, 2002 Linux ACL