Print this page
9728 3secdb man pages need some tlc
   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 GETPROFATTR 3SECDB "Mar 31, 2005"
   7 .SH NAME
   8 getprofattr, getprofnam, free_profattr, setprofattr, endprofattr, getproflist,
   9 free_proflist \- get profile description and attributes
  10 .SH SYNOPSIS
  11 .LP
  12 .nf
  13 cc [ \fIflag\fR... ] \fIfile\fR... -lsecdb  -lsocket  -lnsl [ \fIlibrary\fR... ]
  14 #include <prof_attr.h>
  15 
  16 \fBprofattr_t *\fR\fBgetprofattr\fR(\fBvoid\fR);
  17 .fi
  18 
  19 .LP
  20 .nf
  21 \fBprofattr_t *\fR\fBgetprofnam\fR(\fBconst char *\fR\fI\fR\fIname\fR);
  22 .fi
  23 
  24 .LP
  25 .nf
  26 \fBvoid\fR \fBfree_profattr\fR(\fBprofattr_t *\fR\fIpd\fR);


  30 .nf
  31 \fBvoid\fR \fBsetprofattr\fR(\fBvoid\fR);
  32 .fi
  33 
  34 .LP
  35 .nf
  36 \fBvoid\fR \fBendprofattr\fR(\fBvoid\fR);
  37 .fi
  38 
  39 .LP
  40 .nf
  41 \fBvoid\fR \fBgetproflist\fR(\fBconst char *\fR\fIprofname\fR, \fBchar **\fR\fIproflist\fR, \fBint *\fR\fIprofcnt\fR);
  42 .fi
  43 
  44 .LP
  45 .nf
  46 \fBvoid\fR \fBfree_proflist\fR(\fBchar **\fR\fIproflist\fR, \fBint\fR \fIprofcnt\fR);
  47 .fi
  48 
  49 .SH DESCRIPTION
  50 .sp
  51 .LP
  52 The \fBgetprofattr()\fR and \fBgetprofnam()\fR functions each return a
  53 \fBprof_attr\fR entry. Entries can come from any of the sources specified in
  54 the \fBnsswitch.conf\fR(4) file.
  55 .sp
  56 .LP
  57 The \fBgetprofattr()\fR function enumerates \fBprof_attr\fR entries. The
  58 \fBgetprofnam()\fR function searches for a \fBprof_attr\fR entry with a given
  59 \fIname\fR. Successive calls to these functions return either successive
  60 \fBprof_attr\fR entries or \fINULL\fR.
  61 .sp
  62 .LP
  63 The internal representation of a \fBprof_attr\fR entry is a \fBprofattr_t\fR
  64 structure defined in  <\fBprof_attr.h\fR> with the following members:
  65 .sp
  66 .in +2
  67 .nf
  68 char     *name;   /* Name of the profile */
  69 char     *res1;   /* Reserved for future use */
  70 char     *res2;   /* Reserved for future use */


  85 be called before the first call to \fBgetprofattr()\fR.
  86 .sp
  87 .LP
  88 The \fBendprofattr()\fR function may be called to indicate that \fBprof_attr\fR
  89 processing is complete; the system may then close any open \fBprof_attr\fR
  90 file, deallocate storage, and so forth.
  91 .sp
  92 .LP
  93 The \fBgetproflist()\fR function searches for the list of sub-profiles found in
  94 the given \fIprofname\fR and allocates memory to store this list in
  95 \fIproflist\fR. The given \fIprofname\fR will be included in the list of
  96 sub-profiles. The \fIprofcnt\fR argument indicates the number of items
  97 currently valid in \fIproflist\fR. Memory allocated by \fBgetproflist()\fR
  98 should be freed using the \fBfree_proflist()\fR function.
  99 .sp
 100 .LP
 101 The \fBfree_proflist()\fR function frees memory allocated by the
 102 \fBgetproflist()\fR function.  The \fIprofcnt\fR argument specifies the number
 103 of items to free from the \fIproflist\fR argument.
 104 .SH RETURN VALUES
 105 .sp
 106 .LP
 107 The \fBgetprofattr()\fR function returns a pointer to a \fBprofattr_t\fR if it
 108 successfully enumerates an entry; otherwise it returns \fINULL\fR, indicating
 109 the end of the enumeration.
 110 .sp
 111 .LP
 112 The \fBgetprofnam()\fR function returns a pointer to a \fBprofattr_t\fR if it
 113 successfully locates the requested entry; otherwise it returns \fINULL\fR.
 114 .SH USAGE
 115 .sp
 116 .LP
 117 Individual attributes in the \fBprof_attr_t\fR structure can be referred to by
 118 calling the \fBkva_match\fR(3SECDB) function.
 119 .sp
 120 .LP
 121 Because the list of legal keys is likely to expand, any code  must be written
 122 to ignore unknown key-value pairs without error.
 123 .sp
 124 .LP
 125 The \fBgetprofattr()\fR and \fBgetprofnam()\fR functions both allocate memory
 126 for the pointers they return. This memory should be deallocated with the
 127 \fBfree_profattr()\fR function.
 128 .SH FILES
 129 .sp
 130 .ne 2
 131 .na
 132 \fB\fB/etc/security/prof_attr\fR\fR
 133 .ad
 134 .RS 27n
 135 profiles and their descriptions
 136 .RE
 137 
 138 .SH ATTRIBUTES
 139 .sp
 140 .LP
 141 See \fBattributes\fR(5) for descriptions of the following attributes:
 142 .sp
 143 
 144 .sp
 145 .TS
 146 box;
 147 c | c
 148 l | l .
 149 ATTRIBUTE TYPE  ATTRIBUTE VALUE
 150 _
 151 MT-Level        MT-Safe
 152 .TE
 153 
 154 .SH SEE ALSO
 155 .sp
 156 .LP
 157 \fBauths\fR(1), \fBprofiles\fR(1), \fBgetexecattr\fR(3SECDB),
 158 \fBgetauthattr\fR(3SECDB), \fBprof_attr\fR(4)

   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 GETPROFATTR 3SECDB "Aug 13, 2018"
   7 .SH NAME
   8 getprofattr, getprofnam, free_profattr, setprofattr, endprofattr, getproflist,
   9 free_proflist \- get profile description and attributes
  10 .SH SYNOPSIS
  11 .LP
  12 .nf
  13 cc [ \fIflag\fR... ] \fIfile\fR... -lsecdb  -lsocket  -lnsl [ \fIlibrary\fR... ]
  14 #include <prof_attr.h>
  15 
  16 \fBprofattr_t *\fR\fBgetprofattr\fR(\fBvoid\fR);
  17 .fi
  18 
  19 .LP
  20 .nf
  21 \fBprofattr_t *\fR\fBgetprofnam\fR(\fBconst char *\fR\fI\fR\fIname\fR);
  22 .fi
  23 
  24 .LP
  25 .nf
  26 \fBvoid\fR \fBfree_profattr\fR(\fBprofattr_t *\fR\fIpd\fR);


  30 .nf
  31 \fBvoid\fR \fBsetprofattr\fR(\fBvoid\fR);
  32 .fi
  33 
  34 .LP
  35 .nf
  36 \fBvoid\fR \fBendprofattr\fR(\fBvoid\fR);
  37 .fi
  38 
  39 .LP
  40 .nf
  41 \fBvoid\fR \fBgetproflist\fR(\fBconst char *\fR\fIprofname\fR, \fBchar **\fR\fIproflist\fR, \fBint *\fR\fIprofcnt\fR);
  42 .fi
  43 
  44 .LP
  45 .nf
  46 \fBvoid\fR \fBfree_proflist\fR(\fBchar **\fR\fIproflist\fR, \fBint\fR \fIprofcnt\fR);
  47 .fi
  48 
  49 .SH DESCRIPTION

  50 .LP
  51 The \fBgetprofattr()\fR and \fBgetprofnam()\fR functions each return a
  52 \fBprof_attr\fR entry. Entries can come from any of the sources specified in
  53 the \fBnsswitch.conf\fR(4) file.
  54 .sp
  55 .LP
  56 The \fBgetprofattr()\fR function enumerates \fBprof_attr\fR entries. The
  57 \fBgetprofnam()\fR function searches for a \fBprof_attr\fR entry with a given
  58 \fIname\fR. Successive calls to these functions return either successive
  59 \fBprof_attr\fR entries or \fINULL\fR.
  60 .sp
  61 .LP
  62 The internal representation of a \fBprof_attr\fR entry is a \fBprofattr_t\fR
  63 structure defined in <\fBprof_attr.h\fR> with the following members:
  64 .sp
  65 .in +2
  66 .nf
  67 char     *name;   /* Name of the profile */
  68 char     *res1;   /* Reserved for future use */
  69 char     *res2;   /* Reserved for future use */


  84 be called before the first call to \fBgetprofattr()\fR.
  85 .sp
  86 .LP
  87 The \fBendprofattr()\fR function may be called to indicate that \fBprof_attr\fR
  88 processing is complete; the system may then close any open \fBprof_attr\fR
  89 file, deallocate storage, and so forth.
  90 .sp
  91 .LP
  92 The \fBgetproflist()\fR function searches for the list of sub-profiles found in
  93 the given \fIprofname\fR and allocates memory to store this list in
  94 \fIproflist\fR. The given \fIprofname\fR will be included in the list of
  95 sub-profiles. The \fIprofcnt\fR argument indicates the number of items
  96 currently valid in \fIproflist\fR. Memory allocated by \fBgetproflist()\fR
  97 should be freed using the \fBfree_proflist()\fR function.
  98 .sp
  99 .LP
 100 The \fBfree_proflist()\fR function frees memory allocated by the
 101 \fBgetproflist()\fR function.  The \fIprofcnt\fR argument specifies the number
 102 of items to free from the \fIproflist\fR argument.
 103 .SH RETURN VALUES

 104 .LP
 105 The \fBgetprofattr()\fR function returns a pointer to a \fBprofattr_t\fR if it
 106 successfully enumerates an entry; otherwise it returns \fINULL\fR, indicating
 107 the end of the enumeration.
 108 .sp
 109 .LP
 110 The \fBgetprofnam()\fR function returns a pointer to a \fBprofattr_t\fR if it
 111 successfully locates the requested entry; otherwise it returns \fINULL\fR.
 112 .SH USAGE

 113 .LP
 114 Individual attributes in the \fBprofattr_t\fR structure can be referred to by
 115 calling the \fBkva_match\fR(3SECDB) function.
 116 .sp
 117 .LP
 118 Because the list of legal keys is likely to expand, any code must be written
 119 to ignore unknown key-value pairs without error.
 120 .sp
 121 .LP
 122 The \fBgetprofattr()\fR and \fBgetprofnam()\fR functions both allocate memory
 123 for the pointers they return. This memory should be deallocated with the
 124 \fBfree_profattr()\fR function.
 125 .SH FILES

 126 .ne 2
 127 .na
 128 \fB\fB/etc/security/prof_attr\fR\fR
 129 .ad
 130 .RS 27n
 131 profiles and their descriptions
 132 .RE
 133 
 134 .SH ATTRIBUTES

 135 .LP
 136 See \fBattributes\fR(5) for descriptions of the following attributes:
 137 .sp
 138 
 139 .sp
 140 .TS
 141 box;
 142 c | c
 143 l | l .
 144 ATTRIBUTE TYPE  ATTRIBUTE VALUE
 145 _
 146 MT-Level        MT-Safe
 147 .TE
 148 
 149 .SH SEE ALSO

 150 .LP
 151 \fBauths\fR(1), \fBprofiles\fR(1), \fBgetexecattr\fR(3SECDB),
 152 \fBgetauthattr\fR(3SECDB), \fBkva_match\fR(3SECDB), \fBprof_attr\fR(4),
 153 \fBattributes\fR(5)