2 .\" Copyright (c) 2005, Sun Microsystems, Inc. All Rights Reserved.
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH ACL_STRIP 3SEC "Oct 6, 2005"
8 acl_strip \- remove all ACLs from a file
12 cc [ \fIflag\fR\&.\|.\|. ] \fIfile\fR\&.\|.\|. \fB-lsec\fR [ \fIlibrary\fR\&.\|.\|. ]
15 \fBint\fR \fBacl_strip\fR(\fBconst char *\fR\fIpath\fR, \fBuid_t\fR \fIuid\fR, \fBgid_t\fR \fIgid\fR, \fBmode_t\fR \fImode\fR);
21 The \fBacl_strip()\fR function removes all ACLs from a file and replaces them
22 with a trivial ACL based on the \fImode\fR argument. After replacing the ACL,
23 the owner and group of the file are set to the values specified by the
24 \fIuid\fR and \fIgid\fR arguments.
28 Upon successful completion, \fBacl_strip()\fR returns 0. Otherwise it returns
29 -1 and sets \fBerrno\fR to indicate the error.
33 The \fBacl_strip()\fR function will fail if:
40 Search permission is denied on a component of the path prefix of \fIpath\fR.
49 The \fIpath\fR argument points to an illegal address.
58 The \fIuid\fR or \fIgid\fR argument is out of range.
67 A disk I/O error has occurred while storing or retrieving the ACL.
76 A loop exists in symbolic links encountered during the resolution of the
83 \fB\fBENAMETOOLONG\fR\fR
86 The length of the \fIpath\fR argument exceeds {\fBPATH_MAX\fR}, or the
87 length of a path component exceeds {\fBNAME_MAX\fR} while \fB_POSIX_NO_TRUNC\fR
97 A component of \fIpath\fR does not exist.
106 A component of the prefix of \fIpath\fR is not a directory.
115 The effective user ID does not match the owner of the file and the process does
116 not have appropriate privileges.
125 The file system is mounted read-only.
131 See \fBattributes\fR(5) for descriptions of the following attributes:
139 ATTRIBUTE TYPE ATTRIBUTE VALUE
141 Interface Stability Evolving
149 \fBacl_get\fR(3SEC), \fBacl_trivial\fR(3SEC), \fBacl\fR(5), \fBattributes\fR(5)