Print this page
12288 getfacl and setfacl could stand improvement
   1 '\" te
   2 .\" Copyright (c) 2001, Sun Microsystems, Inc.
   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 ACLTOTEXT 3SEC "Dec 10, 2001"
   7 .SH NAME
   8 acltotext, aclfromtext \- convert internal representation to or from external
   9 representation
  10 .SH SYNOPSIS
  11 .LP
  12 .nf
  13 \fBcc\fR [ \fIflag\fR... ] \fIfile\fR... \fB-lsec\fR [ \fIlibrary\fR... ]
  14 #include <sys/acl.h>
  15 
  16 \fBchar *\fR\fBacltotext\fR(\fBaclent_t *\fR\fIaclbufp\fR, \fBint\fR \fIaclcnt\fR);
  17 .fi
  18 
  19 .LP
  20 .nf
  21 \fBaclent_t *\fR\fBaclfromtext\fR(\fBchar *\fR\fIacltextp\fR, \fBint *\fR\fIaclcnt\fR);
  22 .fi
  23 
  24 .SH DESCRIPTION
  25 .sp
  26 .LP
  27 The \fBacltotext()\fR function converts an internal \fBACL\fR representation
  28 pointed to by \fIaclbufp\fR into an external \fBACL\fR representation. The
  29 space for the external text string is obtained using \fBmalloc\fR(3C). The
  30 caller is responsible for freeing the space upon completion..
  31 .sp
  32 .LP
  33 The \fBaclfromtext()\fR function converts an external \fBACL\fR representation
  34 pointed to by \fIacltextp\fR into an internal \fBACL\fR representation.  The
  35 space for the list of \fBACL\fR entries is obtained using \fBmalloc\fR(3C). The
  36 caller is responsible for freeing the space upon completion. The \fIaclcnt\fR
  37 argument indicates the number of \fBACL\fR entries found.
  38 .sp
  39 .LP
  40 An external \fBACL\fR representation is defined as follows:
  41 .sp
  42 .LP
  43 <acl_entry>[,<acl_entry>]\|.\|.\|.
  44 .sp
  45 .LP
  46 Each <acl_entry> contains one \fBACL\fR entry. The external representation of
  47 an \fBACL\fR entry contains two or three colon-separated fields. The first
  48 field contains the \fBACL\fR entry tag type. The entry type keywords are
  49 defined as:
  50 .sp


 189 
 190 .sp
 191 .ne 2
 192 .na
 193 \fB\fBx\fR\fR
 194 .ad
 195 .RS 9n
 196 execute/search permission
 197 .RE
 198 
 199 .sp
 200 .ne 2
 201 .na
 202 \fB\fB\(mi\fR \fR
 203 .ad
 204 .RS 9n
 205 no access
 206 .RE
 207 
 208 .SH RETURN VALUES
 209 .sp
 210 .LP
 211 Upon successful completion, the \fBacltotext()\fR function returns a pointer to
 212 a text string. Otherwise, it returns \fBNULL\fR.
 213 .sp
 214 .LP
 215 Upon successful completion, the \fBaclfromtext()\fR function returns a pointer
 216 to a list of \fBACL\fR entries. Otherwise, it returns \fBNULL\fR.
 217 .SH ATTRIBUTES
 218 .sp
 219 .LP
 220 See \fBattributes\fR(5) for descriptions of the following attributes:
 221 .sp
 222 
 223 .sp
 224 .TS
 225 box;
 226 c | c
 227 l | l .
 228 ATTRIBUTE TYPE  ATTRIBUTE VALUE
 229 _
 230 Interface Stability     Evolving
 231 _
 232 MT-Level        Unsafe
 233 .TE
 234 
 235 .SH SEE ALSO
 236 .sp
 237 .LP
 238 \fBacl\fR(2), \fBmalloc\fR(3C), \fBattributes\fR(5)
   1 '\" te
   2 .\" Copyright (c) 2001, Sun Microsystems, Inc.
   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 ACLTOTEXT 3SEC "Dec 10, 2001"
   7 .SH NAME
   8 acltotext, aclfromtext \- convert internal representation to or from external
   9 representation
  10 .SH SYNOPSIS

  11 .nf
  12 \fBcc\fR [ \fIflag\fR... ] \fIfile\fR... \fB-lsec\fR [ \fIlibrary\fR... ]
  13 #include <sys/acl.h>
  14 
  15 \fBchar *\fR\fBacltotext\fR(\fBaclent_t *\fR\fIaclbufp\fR, \fBint\fR \fIaclcnt\fR);
  16 .fi
  17 
  18 .LP
  19 .nf
  20 \fBaclent_t *\fR\fBaclfromtext\fR(\fBchar *\fR\fIacltextp\fR, \fBint *\fR\fIaclcnt\fR);
  21 .fi
  22 
  23 .SH DESCRIPTION


  24 The \fBacltotext()\fR function converts an internal \fBACL\fR representation
  25 pointed to by \fIaclbufp\fR into an external \fBACL\fR representation. The
  26 space for the external text string is obtained using \fBmalloc\fR(3C). The
  27 caller is responsible for freeing the space upon completion.
  28 .sp
  29 .LP
  30 The \fBaclfromtext()\fR function converts an external \fBACL\fR representation
  31 pointed to by \fIacltextp\fR into an internal \fBACL\fR representation.  The
  32 space for the list of \fBACL\fR entries is obtained using \fBmalloc\fR(3C). The
  33 caller is responsible for freeing the space upon completion. The \fIaclcnt\fR
  34 argument indicates the number of \fBACL\fR entries found.
  35 .sp
  36 .LP
  37 An external \fBACL\fR representation is defined as follows:
  38 .sp
  39 .LP
  40 <acl_entry>[,<acl_entry>]\|.\|.\|.
  41 .sp
  42 .LP
  43 Each <acl_entry> contains one \fBACL\fR entry. The external representation of
  44 an \fBACL\fR entry contains two or three colon-separated fields. The first
  45 field contains the \fBACL\fR entry tag type. The entry type keywords are
  46 defined as:
  47 .sp


 186 
 187 .sp
 188 .ne 2
 189 .na
 190 \fB\fBx\fR\fR
 191 .ad
 192 .RS 9n
 193 execute/search permission
 194 .RE
 195 
 196 .sp
 197 .ne 2
 198 .na
 199 \fB\fB\(mi\fR \fR
 200 .ad
 201 .RS 9n
 202 no access
 203 .RE
 204 
 205 .SH RETURN VALUES


 206 Upon successful completion, the \fBacltotext()\fR function returns a pointer to
 207 a text string. Otherwise, it returns \fBNULL\fR.
 208 .sp
 209 .LP
 210 Upon successful completion, the \fBaclfromtext()\fR function returns a pointer
 211 to a list of \fBACL\fR entries. Otherwise, it returns \fBNULL\fR.
 212 .SH ATTRIBUTES


 213 See \fBattributes\fR(5) for descriptions of the following attributes:
 214 .sp
 215 
 216 .sp
 217 .TS
 218 box;
 219 c | c
 220 l | l .
 221 ATTRIBUTE TYPE  ATTRIBUTE VALUE
 222 _
 223 Interface Stability     Evolving
 224 _
 225 MT-Level        Unsafe
 226 .TE
 227 
 228 .SH SEE ALSO


 229 \fBacl\fR(2), \fBmalloc\fR(3C), \fBattributes\fR(5)