Print this page
12288 getfacl and setfacl could stand improvement

Split Close
Expand all
Collapse all
          --- old/usr/src/man/man3sec/aclcheck.3sec
          +++ new/usr/src/man/man3sec/aclcheck.3sec
   1    1  '\" te
   2    2  .\" Copyright (c) 2001, Sun Microsystems, Inc.
   3    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    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    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    6  .TH ACLCHECK 3SEC "Dec 10, 2001"
   7    7  .SH NAME
   8    8  aclcheck \- check the validity of an ACL
   9    9  .SH SYNOPSIS
  10      -.LP
  11   10  .nf
  12   11  \fBcc\fR [ \fIflag\fR... ] \fIfile\fR... \fB-lsec\fR [ \fIlibrary\fR... ]
  13   12  #include <sys/acl.h>
  14   13  
  15   14  \fBint\fR \fBaclcheck\fR(\fBaclent_t *\fR\fIaclbufp\fR, \fBint\fR \fInentries\fR, \fBint *\fR\fIwhich\fR);
  16   15  .fi
  17   16  
  18   17  .SH DESCRIPTION
  19      -.sp
  20      -.LP
  21   18  The \fBaclcheck()\fR function checks the validity of an \fBACL\fR pointed to by
  22   19  \fIaclbufp.\fR The \fInentries\fR argument is the number of entries contained
  23   20  in the buffer. The \fIwhich\fR parameter returns the index of the first entry
  24   21  that is invalid.
  25   22  .sp
  26   23  .LP
  27   24  The function verifies that an \fBACL\fR pointed to by \fIaclbufp\fR is valid
  28   25  according to the following rules:
  29   26  .RS +4
  30   27  .TP
↓ open down ↓ 77 lines elided ↑ open up ↑
 108  105  .el o
 109  106  If there are any \fBDEF_GROUP\fR or \fBDEF_USER\fR entries, then there must be
 110  107  exactly one \fBDEF_CLASS_OBJ\fR (default \fBACL\fR mask) entry.
 111  108  .RE
 112  109  .RE
 113  110  .RS +4
 114  111  .TP
 115  112  .ie t \(bu
 116  113  .el o
 117  114  If any of the above rules are violated, then the function fails with
 118      -\fBerrno\fR set to  \fBEINVAL\fR.
      115 +\fBerrno\fR set to \fBEINVAL\fR.
 119  116  .RE
 120  117  .SH RETURN VALUES
 121      -.sp
 122      -.LP
 123      -If the \fBACL\fR is valid, \fBalcheck()\fR will return \fB0\fR. Otherwise
 124      -\fBerrno\fR is set to \fBEINVAL\fR and return code is set to one of the
      118 +If the \fBACL\fR is valid, \fBaclcheck()\fR will return \fB0\fR. Otherwise
      119 +\fBerrno\fR is set to \fBEINVAL\fR and \fBaclcheck()\fR will return one of the
 125  120  following:
 126  121  .sp
 127  122  .ne 2
 128  123  .na
 129  124  \fB\fBGRP_ERROR\fR\fR
 130  125  .ad
 131  126  .RS 19n
 132  127  There is more than one \fBGROUP_OBJ\fR or \fBDEF_GROUP_OBJ\fR \fBACL\fR entry.
 133  128  .RE
 134  129  
↓ open down ↓ 57 lines elided ↑ open up ↑
 192  187  .ne 2
 193  188  .na
 194  189  \fB\fBMEM_ERROR\fR\fR
 195  190  .ad
 196  191  .RS 19n
 197  192  The system cannot allocate any memory. The \fBwhich\fR parameter returns
 198  193  \fB\(mi1\fR in this case.
 199  194  .RE
 200  195  
 201  196  .SH ATTRIBUTES
 202      -.sp
 203      -.LP
 204  197  See \fBattributes\fR(5) for descriptions of the following attributes:
 205  198  .sp
 206  199  
 207  200  .sp
 208  201  .TS
 209  202  box;
 210  203  c | c
 211  204  l | l .
 212  205  ATTRIBUTE TYPE  ATTRIBUTE VALUE
 213  206  _
 214  207  Interface Stability     Evolving
 215  208  _
 216  209  MT-Level        Unsafe
 217  210  .TE
 218  211  
 219  212  .SH SEE ALSO
 220      -.sp
 221      -.LP
 222  213  \fBacl\fR(2), \fBaclsort\fR(3SEC), \fBattributes\fR(5)
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX