1ACL_DUP(3)               BSD Library Functions Manual               ACL_DUP(3)
2

NAME

4     acl_dup — duplicate an ACL
5

LIBRARY

7     Linux Access Control Lists library (libacl, -lacl).
8

SYNOPSIS

10     #include <sys/types.h>
11     #include <sys/acl.h>
12
13     acl_t
14     acl_dup(acl_t acl);
15

DESCRIPTION

17     The acl_dup() function returns a pointer to a copy of the ACL pointed to
18     by acl.
19
20     This function may cause memory to be allocated.  The caller should free
21     any releasable memory, when the new ACL is no longer required, by calling
22     acl_free(3) with the (void*)acl_t returned by acl_dup() as an argument.
23

RETURN VALUE

25     On success, this function returns a pointer to the working storage.  On
26     error, a value of (acl_t)NULL is returned, and errno is set appropri‐
27     ately.
28

ERRORS

30     If any of the following conditions occur, the acl_dup() function returns
31     a value of (acl_t)NULL and sets errno to the corresponding value:
32
33     [EINVAL]           The argument acl is not a valid pointer to an ACL.
34
35     [ENOMEM]           The acl_t to be returned requires more memory than is
36                        allowed by the hardware or system-imposed memory man‐
37                        agement constraints.
38

STANDARDS

40     IEEE Std 1003.1e draft 17 (“POSIX.1e”, abandoned)
41

SEE ALSO

43     acl_free(3), acl_get_entry(3), acl(5)
44

AUTHOR

46     Derived from the FreeBSD manual pages written by Robert N M Watson
47     <rwatson@FreeBSD.org>, and adapted for Linux by Andreas Gruenbacher
48     <a.gruenbacher@bestbits.at>.
49
50Linux ACL                       March 23, 2002                       Linux ACL
Impressum