Imported Upstream version 2.2.51
[platform/upstream/acl.git] / man / man3 / acl_dup.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_DUP 3
26 .Os "Linux ACL"
27 .Sh NAME
28 .Nm acl_dup
29 .Nd duplicate an ACL
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 acl_t
36 .Fn acl_dup "acl_t acl"
37 .Sh DESCRIPTION
38 The
39 .Fn acl_dup
40 function returns a pointer to a copy of the ACL pointed to by
41 .Va acl .
42 .Pp
43 This function may cause memory to be allocated.  The caller should free any
44 releasable memory, when the new ACL is no longer required, by calling
45 .Xr acl_free 3
46 with the
47 .Va (void*)acl_t
48 returned by
49 .Fn acl_dup
50 as an argument.
51 .Sh RETURN VALUE
52 On success, this function returns a pointer to the
53 working storage.  On error, a value of
54 .Li (acl_t)NULL
55 is returned, and
56 .Va errno
57 is set appropriately.
58 .Sh ERRORS
59 If any of the following conditions occur, the
60 .Fn acl_dup
61 function returns a value of
62 .Li (acl_t)NULL
63 and sets
64 .Va errno
65 to the corresponding value:
66 .Bl -tag -width Er
67 .It Bq Er EINVAL
68 The argument
69 .Va acl
70 is not a valid pointer to an ACL.
71 .It Bq Er ENOMEM
72 The
73 .Va acl_t
74 to be returned requires more memory than is allowed by the hardware or
75 system-imposed memory management constraints.
76 .El
77 .Sh STANDARDS
78 IEEE Std 1003.1e draft 17 (\(lqPOSIX.1e\(rq, abandoned)
79 .Sh SEE ALSO
80 .Xr acl_free 3 ,
81 .Xr acl_get_entry 3 ,
82 .Xr acl 5
83 .Sh AUTHOR
84 Derived from the FreeBSD manual pages written by
85 .An "Robert N M Watson" Aq rwatson@FreeBSD.org ,
86 and adapted for Linux by
87 .An "Andreas Gruenbacher" Aq a.gruenbacher@bestbits.at .