Print this page
uts: add a concept of a 'default' set of privileges, separate from 'basic'
   1 '\" te
   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 PRIV_ADDSET 3C "Sep 08, 2015"
   7 .SH NAME
   8 priv_addset, priv_allocset, priv_copyset, priv_delset, priv_emptyset,
   9 priv_basicset, priv_fillset, priv_freeset, priv_intersect, priv_inverse,
  10 priv_isemptyset, priv_isequalset, priv_isfullset, priv_ismember,
  11 priv_issubset, priv_union \-
  12 privilege set manipulation functions
  13 .SH SYNOPSIS
  14 .LP
  15 .nf
  16 #include <priv.h>
  17 
  18 \fBint\fR \fBpriv_addset\fR(\fBpriv_set_t *\fR\fIsp\fR, \fBconst char *\fR\fIpriv\fR);
  19 .fi
  20 
  21 .LP
  22 .nf
  23 \fBpriv_set_t *\fR\fBpriv_allocset\fR(\fBvoid\fR);
  24 .fi
  25 
  26 .LP
  27 .nf
  28 \fBvoid\fR \fBpriv_copyset\fR(\fBconst priv_set_t *\fR\fIsrc\fR, \fBpriv_set_t *\fR\fIdst\fR);
  29 .fi
  30 
  31 .LP
  32 .nf
  33 \fBint\fR \fBpriv_delset\fR(\fBpriv_set_t *\fR\fIsp\fR, \fBconst char *\fR\fIpriv\fR);
  34 .fi
  35 
  36 .LP
  37 .nf
  38 \fBvoid\fR \fBpriv_emptyset\fR(\fBpriv_set_t *\fR\fIsp\fR);
  39 .fi
  40 
  41 .LP
  42 .nf
  43 \fBvoid\fR \fBpriv_basicset\fR(\fBpriv_set_t *\fR\fIsp\fR);
  44 .fi
  45 
  46 .LP
  47 .nf





  48 \fBvoid\fR \fBpriv_fillset\fR(\fBpriv_set_t *\fR\fIsp\fR);
  49 .fi
  50 
  51 .LP
  52 .nf
  53 \fBvoid\fR \fBpriv_freeset\fR(\fBpriv_set_t *\fR\fIsp\fR);
  54 .fi
  55 
  56 .LP
  57 .nf
  58 \fBvoid\fR \fBpriv_intersect\fR(\fBconst priv_set_t *\fR\fIsrc\fR, \fBpriv_set_t *\fR\fIdst\fR);
  59 .fi
  60 
  61 .LP
  62 .nf
  63 \fBvoid\fR \fBpriv_inverse\fR(\fBpriv_set_t *\fR\fIsp\fR);
  64 .fi
  65 
  66 .LP
  67 .nf


 105 .LP
 106 The \fBpriv_allocset()\fR function allocates sufficient memory to contain a
 107 privilege set. The value of the returned privilege set is indeterminate. The
 108 function returns \fINULL\fR and sets \fBerrno\fR when it fails to allocate
 109 memory.
 110 .sp
 111 .LP
 112 The \fBpriv_copyset()\fR function copies the set \fIsrc\fR to \fIdst\fR.
 113 .sp
 114 .LP
 115 The \fBpriv_delset()\fR function removes the named privilege \fIpriv\fR from
 116 \fIsp\fR.
 117 .sp
 118 .LP
 119 The \fBpriv_emptyset()\fR function clears all privileges from \fIsp\fR.
 120 .sp
 121 .LP
 122 The \fBpriv_basicset()\fR function copies the basic privilege set to \fIsp\fR.
 123 .sp
 124 .LP




 125 The \fBpriv_fillset()\fR function asserts all privileges in \fIsp\fR, including
 126 the privileges not currently defined in the system.
 127 .sp
 128 .LP
 129 The \fBpriv_freeset()\fR function frees the storage allocated by
 130 \fBpriv_allocset()\fR.
 131 .sp
 132 .LP
 133 The \fBpriv_intersect()\fR function intersects \fIsrc\fR with \fIdst\fR and
 134 places the results in \fIdst\fR.
 135 .sp
 136 .LP
 137 The \fBpriv_inverse()\fR function inverts the privilege set given as argument
 138 in place.
 139 .sp
 140 .LP
 141 The \fBpriv_isemptyset()\fR function checks whether the argument is an empty
 142 set.
 143 .sp
 144 .LP


   1 '\" te
   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 PRIV_ADDSET 3C "Sep 08, 2015"
   7 .SH NAME
   8 priv_addset, priv_allocset, priv_copyset, priv_delset, priv_emptyset,
   9 priv_basicset, priv_defaultset, priv_fillset, priv_freeset, priv_intersect,
  10 priv_inverse, priv_isemptyset, priv_isequalset, priv_isfullset, priv_ismember,
  11 priv_issubset, priv_union \-
  12 privilege set manipulation functions
  13 .SH SYNOPSIS
  14 .LP
  15 .nf
  16 #include <priv.h>
  17 
  18 \fBint\fR \fBpriv_addset\fR(\fBpriv_set_t *\fR\fIsp\fR, \fBconst char *\fR\fIpriv\fR);
  19 .fi
  20 
  21 .LP
  22 .nf
  23 \fBpriv_set_t *\fR\fBpriv_allocset\fR(\fBvoid\fR);
  24 .fi
  25 
  26 .LP
  27 .nf
  28 \fBvoid\fR \fBpriv_copyset\fR(\fBconst priv_set_t *\fR\fIsrc\fR, \fBpriv_set_t *\fR\fIdst\fR);
  29 .fi
  30 
  31 .LP
  32 .nf
  33 \fBint\fR \fBpriv_delset\fR(\fBpriv_set_t *\fR\fIsp\fR, \fBconst char *\fR\fIpriv\fR);
  34 .fi
  35 
  36 .LP
  37 .nf
  38 \fBvoid\fR \fBpriv_emptyset\fR(\fBpriv_set_t *\fR\fIsp\fR);
  39 .fi
  40 
  41 .LP
  42 .nf
  43 \fBvoid\fR \fBpriv_basicset\fR(\fBpriv_set_t *\fR\fIsp\fR);
  44 .fi
  45 
  46 .LP
  47 .nf
  48 \fBvoid\fR \fBpriv_defaultset\fR(\fBpriv_set_t *\fR\fIsp\fR);
  49 .fi
  50 
  51 .LP
  52 .nf
  53 \fBvoid\fR \fBpriv_fillset\fR(\fBpriv_set_t *\fR\fIsp\fR);
  54 .fi
  55 
  56 .LP
  57 .nf
  58 \fBvoid\fR \fBpriv_freeset\fR(\fBpriv_set_t *\fR\fIsp\fR);
  59 .fi
  60 
  61 .LP
  62 .nf
  63 \fBvoid\fR \fBpriv_intersect\fR(\fBconst priv_set_t *\fR\fIsrc\fR, \fBpriv_set_t *\fR\fIdst\fR);
  64 .fi
  65 
  66 .LP
  67 .nf
  68 \fBvoid\fR \fBpriv_inverse\fR(\fBpriv_set_t *\fR\fIsp\fR);
  69 .fi
  70 
  71 .LP
  72 .nf


 110 .LP
 111 The \fBpriv_allocset()\fR function allocates sufficient memory to contain a
 112 privilege set. The value of the returned privilege set is indeterminate. The
 113 function returns \fINULL\fR and sets \fBerrno\fR when it fails to allocate
 114 memory.
 115 .sp
 116 .LP
 117 The \fBpriv_copyset()\fR function copies the set \fIsrc\fR to \fIdst\fR.
 118 .sp
 119 .LP
 120 The \fBpriv_delset()\fR function removes the named privilege \fIpriv\fR from
 121 \fIsp\fR.
 122 .sp
 123 .LP
 124 The \fBpriv_emptyset()\fR function clears all privileges from \fIsp\fR.
 125 .sp
 126 .LP
 127 The \fBpriv_basicset()\fR function copies the basic privilege set to \fIsp\fR.
 128 .sp
 129 .LP
 130 The \fBpriv_defaultset()\fR function copies the default privilege set to
 131 \fIsp\fR.
 132 .sp
 133 .LP
 134 The \fBpriv_fillset()\fR function asserts all privileges in \fIsp\fR, including
 135 the privileges not currently defined in the system.
 136 .sp
 137 .LP
 138 The \fBpriv_freeset()\fR function frees the storage allocated by
 139 \fBpriv_allocset()\fR.
 140 .sp
 141 .LP
 142 The \fBpriv_intersect()\fR function intersects \fIsrc\fR with \fIdst\fR and
 143 places the results in \fIdst\fR.
 144 .sp
 145 .LP
 146 The \fBpriv_inverse()\fR function inverts the privilege set given as argument
 147 in place.
 148 .sp
 149 .LP
 150 The \fBpriv_isemptyset()\fR function checks whether the argument is an empty
 151 set.
 152 .sp
 153 .LP