Print this page
12288 getfacl and setfacl could stand improvement

Split Close
Expand all
Collapse all
          --- old/usr/src/man/man3sec/acl_totext.3sec
          +++ new/usr/src/man/man3sec/acl_totext.3sec
   1    1  '\" te
   2    2  .\" Copyright (c) 20068 Sun Microsystems, Inc. All Rights Reserved.
   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 ACL_TOTEXT 3SEC "Jun 16, 2008"
   7    7  .SH NAME
   8    8  acl_totext, acl_fromtext \- convert internal representation  to or from
   9    9  external representation
  10   10  .SH SYNOPSIS
  11      -.LP
  12   11  .nf
  13   12  cc [ \fIflag\fR\&.\|.\|. ] \fIfile\fR\&.\|.\|. \fB-lsec\fR [ \fIlibrary\fR\&.\|.\|. ]
  14   13  #include <sys/acl.h>
  15   14  
  16   15  \fBchar *\fR\fBacl_totext\fR(\fBacl_t *\fR\fIaclp\fR, \fBint\fR \fIflags\fR);
  17   16  .fi
  18   17  
  19   18  .LP
  20   19  .nf
  21   20  \fBint\fR \fBacl_fromtext\fR(\fBchar *\fR\fIacltextp\fR, \fBacl_t **\fR\fIaclp\fR);
  22   21  .fi
  23   22  
  24   23  .SH DESCRIPTION
  25      -.sp
  26      -.LP
  27   24  The \fBacl_totext()\fR function converts an internal ACL representation pointed
  28   25  to by \fIaclp\fR into an external ACL representation. The memory for the
  29   26  external text string is obtained using \fBmalloc\fR(3C). The caller is
  30   27  responsible for freeing the memory upon completion.
  31   28  .sp
  32   29  .LP
  33   30  The format of the external ACL is controlled by the \fIflags\fR argument.
  34   31  Values for \fIflags\fR are constructed by a bitwise-inclusive-OR of \fIflags\fR
  35   32  from the following list, defined in <\fBsys/acl.h\fR>.
  36   33  .sp
↓ open down ↓ 6 lines elided ↑ open up ↑
  43   40  detailed in \fBls\fR(1) for the \fB-V\fR option.
  44   41  .RE
  45   42  
  46   43  .sp
  47   44  .ne 2
  48   45  .na
  49   46  \fB\fBACL_APPEND_ID\fR\fR
  50   47  .ad
  51   48  .RS 19n
  52   49  Append the \fBuid\fR or \fBgid\fR for additional user or group entries.  This
  53      -flag is used to construt ACL entries in a manner that is suitable for archive
       50 +flag is used to construct ACL entries in a manner that is suitable for archive
  54   51  utilities such as \fBtar\fR(1). When the ACL is translated from the external
  55   52  format to internal representation using \fBacl_fromtext()\fR, the appended ID
  56   53  will be used to populate the \fBuid\fR or \fBgid\fR field of the ACL entry when
  57   54  the user or group name does not exist on the host system. The appended id will
  58   55  be ignored when the user or group name does exist on the system.
  59   56  .RE
  60   57  
  61   58  .sp
  62   59  .ne 2
  63   60  .na
↓ open down ↓ 540 lines elided ↑ open up ↑
 604  601  .sp
 605  602  .ne 2
 606  603  .na
 607  604  \fB\fBdeny\fR\fR
 608  605  .ad
 609  606  .RS 9n
 610  607  The mask specified in field three should be denied.
 611  608  .RE
 612  609  
 613  610  .SH RETURN VALUES
 614      -.sp
 615      -.LP
 616  611  Upon successful completion, the \fBacl_totext()\fR function returns a pointer
 617  612  to a text string. Otherwise, it returns \fINULL\fR.
 618  613  .sp
 619  614  .LP
 620  615  Upon successful completion, the \fBacl_fromtext()\fR function returns 0.
 621  616  Otherwise, the return value is set to one of the following:
 622  617  .sp
 623  618  .ne 2
 624  619  .na
 625  620  \fB\fBEACL_FIELD_NOT_BLANK\fR\fR
↓ open down ↓ 68 lines elided ↑ open up ↑
 694  689  .sp
 695  690  .ne 2
 696  691  .na
 697  692  \fB\fBEACL_UNKNOWN_DATA\fR\fR
 698  693  .ad
 699  694  .RS 28n
 700  695  Unknown data was found in the ACL.
 701  696  .RE
 702  697  
 703  698  .SH EXAMPLES
 704      -.LP
 705  699  \fBExample 1 \fRExamples of permissions when \fBACL_COMPACT_FMT\fR is not
 706  700  specified.
 707  701  .sp
 708  702  .in +2
 709  703  .nf
 710  704  user:joe:read_data/write_data:file_inherit/dir_inherit:allow
 711  705  .fi
 712  706  .in -2
 713  707  .sp
 714  708  
↓ open down ↓ 18 lines elided ↑ open up ↑
 733  727  
 734  728  .sp
 735  729  .in +2
 736  730  .nf
 737  731  owner@:----------c---:------allow,user:tom:r-------------:f-i---:deny
 738  732  .fi
 739  733  .in -2
 740  734  .sp
 741  735  
 742  736  .SH ATTRIBUTES
 743      -.sp
 744      -.LP
 745  737  See \fBattributes\fR(5) for descriptions of the following attributes:
 746  738  .sp
 747  739  
 748  740  .sp
 749  741  .TS
 750  742  box;
 751  743  c | c
 752  744  l | l .
 753  745  ATTRIBUTE TYPE  ATTRIBUTE VALUE
 754  746  _
 755  747  Interface Stability     Committed
 756  748  _
 757  749  MT-Level        Safe
 758  750  .TE
 759  751  
 760  752  .SH SEE ALSO
 761      -.sp
 762      -.LP
 763  753  \fBls\fR(1), \fBtar\fR(1), \fBacl\fR(2), \fBmalloc\fR(3C),
 764  754  \fBaclfromtext\fR(3SEC), \fBacl\fR(5), \fBattributes\fR(5)
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX