1ACL_COPY_EXT(3) BSD Library Functions Manual ACL_COPY_EXT(3)
2
4 acl_copy_ext — copy an ACL from internal to external representation
5
7 Linux Access Control Lists library (libacl, -lacl).
8
10 #include <sys/types.h>
11 #include <sys/acl.h>
12
13 ssize_t
14 acl_copy_ext(void *buf_p, acl_t acl, ssize_t size);
15
17 The acl_copy_ext() function copies the ACL pointed to by acl from system-
18 managed space to the user managed space pointed to by buf_p. The size
19 parameter represents the size in bytes of the buffer pointed to by buf_p.
20 The format of the ACL placed in the buffer pointed to by buf_p is a con‐
21 tiguous, persistent data item, the format of which is unspecified. It is
22 the responsibility of the invoker to allocate an area large enough to
23 hold the copied ACL. The size of the exportable, contiguous, persistent
24 form of the ACL may be obtained by invoking the acl_size() function.
25
26 Any ACL entry descriptors that refer to an entry in the ACL referenced by
27 acl continue to refer to those entries. Any existing ACL pointers that
28 refer to the ACL referenced by acl continue to refer to the ACL.
29
31 Upon success, this function returns the number of bytes placed in the
32 buffer pointed to by buf_p. On error, a value of (ssize_t)-1 is returned
33 and errno is set appropriately.
34
36 If any of the following conditions occur, the acl_copy_ext() function re‐
37 turns a value of (ssize_t)-1 and sets errno to the corresponding value:
38
39 [EINVAL] The size parameter is zero or negative.
40
41 The argument acl is not a valid pointer to an ACL.
42
43 The ACL referenced by acl contains one or more improp‐
44 erly formed ACL entries, or for some other reason can‐
45 not be translated into the external form of an ACL.
46
47 [ERANGE] The size parameter is greater than zero but smaller
48 than the length of the contiguous, persistent form of
49 the ACL.
50
52 IEEE Std 1003.1e draft 17 (“POSIX.1e”, abandoned)
53
55 acl_copy_int(3), acl_size(3), 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 <andreas.gruenbacher@gmail.com>.
61
62Linux ACL March 23, 2002 Linux ACL