1.\" $NetBSD: acl_dup.3,v 1.2 2020/06/18 19:46:34 wiz Exp $ 2.\"- 3.\" Copyright (c) 2000, 2002 Robert N. M. Watson 4.\" All rights reserved. 5.\" 6.\" This software was developed by Robert Watson for the TrustedBSD Project. 7.\" 8.\" Redistribution and use in source and binary forms, with or without 9.\" modification, are permitted provided that the following conditions 10.\" are met: 11.\" 1. Redistributions of source code must retain the above copyright 12.\" notice, this list of conditions and the following disclaimer. 13.\" 2. Redistributions in binary form must reproduce the above copyright 14.\" notice, this list of conditions and the following disclaimer in the 15.\" documentation and/or other materials provided with the distribution. 16.\" 17.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27.\" SUCH DAMAGE. 28.\" 29.\" $FreeBSD: head/lib/libc/posix1e/acl_dup.3 131504 2004-07-02 23:52:20Z ru $ 30.\" 31.Dd January 28, 2000 32.Dt ACL_DUP 3 33.Os 34.Sh NAME 35.Nm acl_dup 36.Nd duplicate an ACL 37.Sh LIBRARY 38.Lb libc 39.Sh SYNOPSIS 40.In sys/types.h 41.In sys/acl.h 42.Ft acl_t 43.Fn acl_dup "acl_t acl" 44.Sh DESCRIPTION 45The 46.Fn acl_dup 47function returns a pointer to a copy of the ACL pointed to by the argument 48.Va acl . 49.Pp 50This function may cause memory to be allocated. 51The caller should free any 52releasable memory, when the new ACL is no longer required, by calling 53.Xr acl_free 3 54with the 55.Va (void*)acl_t 56as an argument. 57.Pp 58Any existing ACL pointers that refer to the ACL referred to by 59.Va acl 60shall continue to refer to the ACL. 61.Sh IMPLEMENTATION NOTES 62.Fx Ns 's 63support for POSIX.1e interfaces and features is still under 64development at this time. 65.Sh RETURN VALUES 66Upon successful completion, this function shall return a pointer to the 67duplicate ACL. 68Otherwise, a value of 69.Va (acl_t)NULL 70shall be returned, and 71.Va errno 72shall be set to indicate the error. 73.Sh ERRORS 74If any of the following conditions occur, the 75.Fn acl_init 76function shall return a value of 77.Va (acl_t)NULL 78and set 79.Va errno 80to the corresponding value: 81.Bl -tag -width Er 82.It Bq Er EINVAL 83Argument 84.Va acl 85does not point to a valid ACL. 86.It Bq Er ENOMEM 87The 88.Va acl_t 89to be returned requires more memory than is allowed by the hardware or 90system-imposed memory management constraints. 91.El 92.Sh SEE ALSO 93.Xr acl 3 , 94.Xr acl_free 3 , 95.Xr acl_get 3 , 96.Xr posix1e 3 97.Sh STANDARDS 98POSIX.1e is described in IEEE POSIX.1e draft 17. 99Discussion 100of the draft continues on the cross-platform POSIX.1e implementation 101mailing list. 102To join this list, see the 103.Fx 104POSIX.1e implementation 105page for more information. 106.Sh HISTORY 107POSIX.1e support was introduced in 108.Fx 4.0 , 109and development continues. 110.Sh AUTHORS 111.An Robert N M Watson 112