1ACL_CREATE_ENTRY(3) BSD Library Functions Manual ACL_CREATE_ENTRY(3)
2
4 acl_create_entry — create a new ACL entry
5
7 Linux Access Control Lists library (libacl, -lacl).
8
10 #include <sys/types.h>
11 #include <sys/acl.h>
12
13 int
14 acl_create_entry(acl_t *acl_p, acl_entry_t *entry_p);
15
17 The acl_create_entry() function creates a new ACL entry in the ACL
18 pointed to by the contents of the pointer argument acl_p. On success,
19 the function returns a descriptor for the new ACL entry via entry_p.
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 (void*)*acl_p as an argument. If the ACL working stor‐
24 age cannot be increased in the current location, then the working storage
25 for the ACL pointed to by acl_p may be relocated and the previous working
26 storage is released. A pointer to the new working storage is returned via
27 acl_p.
28
29 The components of the new ACL entry are initialized in the following
30 ways: the ACL tag type component contains ACL_UNDEFINED_TAG, the quali‐
31 fier component contains ACL_UNDEFINED_ID, and the set of permissions has
32 no permissions enabled. Any existing ACL entry descriptors that refer to
33 entries in the ACL continue to refer to those entries.
34
36 The acl_create_entry() function returns the value 0 if successful; other‐
37 wise the value -1 is returned and the global variable errno is set to
38 indicate the error.
39
41 If any of the following conditions occur, the acl_create_entry() function
42 returns -1 and sets errno to the corresponding value:
43
44 [EINVAL] The argument acl_p is not a valid pointer to an ACL.
45
46 [ENOMEM] The ACL working storage requires more memory than is
47 allowed by the hardware or system-imposed memory man‐
48 agement constraints.
49
51 IEEE Std 1003.1e draft 17 (“POSIX.1e”, abandoned)
52
54 acl_init(3), acl_delete_entry(3), acl_free(3), acl_create_entry(3),
55 acl(5)
56
58 Derived from the FreeBSD manual pages written by Robert N M Watson
59 <rwatson@FreeBSD.org>, and adapted for Linux by Andreas Gruenbacher
60 <a.gruenbacher@bestbits.at>.
61
62Linux ACL March 23, 2002 Linux ACL