Print this page
9728 3secdb man pages need some tlc
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/man/man3secdb/getprofattr.3secdb
+++ new/usr/src/man/man3secdb/getprofattr.3secdb
1 1 '\" te
2 2 .\" Copyright (c) 2005, 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 -.TH GETPROFATTR 3SECDB "Mar 31, 2005"
6 +.TH GETPROFATTR 3SECDB "Aug 13, 2018"
7 7 .SH NAME
8 8 getprofattr, getprofnam, free_profattr, setprofattr, endprofattr, getproflist,
9 9 free_proflist \- get profile description and attributes
10 10 .SH SYNOPSIS
11 11 .LP
12 12 .nf
13 13 cc [ \fIflag\fR... ] \fIfile\fR... -lsecdb -lsocket -lnsl [ \fIlibrary\fR... ]
14 14 #include <prof_attr.h>
15 15
16 16 \fBprofattr_t *\fR\fBgetprofattr\fR(\fBvoid\fR);
17 17 .fi
18 18
19 19 .LP
20 20 .nf
21 21 \fBprofattr_t *\fR\fBgetprofnam\fR(\fBconst char *\fR\fI\fR\fIname\fR);
22 22 .fi
23 23
24 24 .LP
25 25 .nf
26 26 \fBvoid\fR \fBfree_profattr\fR(\fBprofattr_t *\fR\fIpd\fR);
27 27 .fi
28 28
29 29 .LP
30 30 .nf
31 31 \fBvoid\fR \fBsetprofattr\fR(\fBvoid\fR);
32 32 .fi
33 33
34 34 .LP
35 35 .nf
36 36 \fBvoid\fR \fBendprofattr\fR(\fBvoid\fR);
37 37 .fi
38 38
39 39 .LP
↓ open down ↓ |
23 lines elided |
↑ open up ↑ |
40 40 .nf
41 41 \fBvoid\fR \fBgetproflist\fR(\fBconst char *\fR\fIprofname\fR, \fBchar **\fR\fIproflist\fR, \fBint *\fR\fIprofcnt\fR);
42 42 .fi
43 43
44 44 .LP
45 45 .nf
46 46 \fBvoid\fR \fBfree_proflist\fR(\fBchar **\fR\fIproflist\fR, \fBint\fR \fIprofcnt\fR);
47 47 .fi
48 48
49 49 .SH DESCRIPTION
50 -.sp
51 50 .LP
52 51 The \fBgetprofattr()\fR and \fBgetprofnam()\fR functions each return a
53 52 \fBprof_attr\fR entry. Entries can come from any of the sources specified in
54 53 the \fBnsswitch.conf\fR(4) file.
55 54 .sp
56 55 .LP
57 56 The \fBgetprofattr()\fR function enumerates \fBprof_attr\fR entries. The
58 57 \fBgetprofnam()\fR function searches for a \fBprof_attr\fR entry with a given
59 58 \fIname\fR. Successive calls to these functions return either successive
60 59 \fBprof_attr\fR entries or \fINULL\fR.
61 60 .sp
62 61 .LP
63 62 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:
63 +structure defined in <\fBprof_attr.h\fR> with the following members:
65 64 .sp
66 65 .in +2
67 66 .nf
68 67 char *name; /* Name of the profile */
69 68 char *res1; /* Reserved for future use */
70 69 char *res2; /* Reserved for future use */
71 70 char *desc; /* Description/Purpose of the profile */
72 71 kva_t *attr; /* Profile attributes */
73 72 .fi
74 73 .in -2
75 74
76 75 .sp
77 76 .LP
78 77 The \fBfree_profattr()\fR function releases memory allocated by the
79 78 \fBgetprofattr()\fR and \fBgetprofnam()\fR functions.
80 79 .sp
81 80 .LP
82 81 The \fBsetprofattr()\fR function "rewinds" to the beginning of the enumeration
83 82 of \fBprof_attr\fR entries. Calls to \fBgetprofnam()\fR can leave the
84 -enumeration in an indeterminate state. Therefore, \fBsetprofattr()\fR should
83 +enumeration in an indeterminate state. Therefore, \fBsetprofattr()\fR should
85 84 be called before the first call to \fBgetprofattr()\fR.
86 85 .sp
87 86 .LP
88 87 The \fBendprofattr()\fR function may be called to indicate that \fBprof_attr\fR
89 88 processing is complete; the system may then close any open \fBprof_attr\fR
90 89 file, deallocate storage, and so forth.
91 90 .sp
92 91 .LP
93 92 The \fBgetproflist()\fR function searches for the list of sub-profiles found in
94 93 the given \fIprofname\fR and allocates memory to store this list in
95 94 \fIproflist\fR. The given \fIprofname\fR will be included in the list of
96 95 sub-profiles. The \fIprofcnt\fR argument indicates the number of items
97 96 currently valid in \fIproflist\fR. Memory allocated by \fBgetproflist()\fR
98 97 should be freed using the \fBfree_proflist()\fR function.
99 98 .sp
100 99 .LP
101 100 The \fBfree_proflist()\fR function frees memory allocated by the
102 101 \fBgetproflist()\fR function. The \fIprofcnt\fR argument specifies the number
103 102 of items to free from the \fIproflist\fR argument.
104 103 .SH RETURN VALUES
105 -.sp
106 104 .LP
107 105 The \fBgetprofattr()\fR function returns a pointer to a \fBprofattr_t\fR if it
108 106 successfully enumerates an entry; otherwise it returns \fINULL\fR, indicating
109 107 the end of the enumeration.
110 108 .sp
111 109 .LP
112 110 The \fBgetprofnam()\fR function returns a pointer to a \fBprofattr_t\fR if it
113 111 successfully locates the requested entry; otherwise it returns \fINULL\fR.
114 112 .SH USAGE
115 -.sp
116 113 .LP
117 -Individual attributes in the \fBprof_attr_t\fR structure can be referred to by
114 +Individual attributes in the \fBprofattr_t\fR structure can be referred to by
118 115 calling the \fBkva_match\fR(3SECDB) function.
119 116 .sp
120 117 .LP
121 -Because the list of legal keys is likely to expand, any code must be written
118 +Because the list of legal keys is likely to expand, any code must be written
122 119 to ignore unknown key-value pairs without error.
123 120 .sp
124 121 .LP
125 122 The \fBgetprofattr()\fR and \fBgetprofnam()\fR functions both allocate memory
126 123 for the pointers they return. This memory should be deallocated with the
127 124 \fBfree_profattr()\fR function.
128 125 .SH FILES
129 -.sp
130 126 .ne 2
131 127 .na
132 128 \fB\fB/etc/security/prof_attr\fR\fR
133 129 .ad
134 130 .RS 27n
135 131 profiles and their descriptions
136 132 .RE
137 133
138 134 .SH ATTRIBUTES
139 -.sp
140 135 .LP
141 136 See \fBattributes\fR(5) for descriptions of the following attributes:
142 137 .sp
143 138
144 139 .sp
145 140 .TS
146 141 box;
147 142 c | c
148 143 l | l .
149 144 ATTRIBUTE TYPE ATTRIBUTE VALUE
150 145 _
151 146 MT-Level MT-Safe
152 147 .TE
153 148
154 149 .SH SEE ALSO
155 -.sp
156 150 .LP
157 151 \fBauths\fR(1), \fBprofiles\fR(1), \fBgetexecattr\fR(3SECDB),
158 -\fBgetauthattr\fR(3SECDB), \fBprof_attr\fR(4)
152 +\fBgetauthattr\fR(3SECDB), \fBkva_match\fR(3SECDB), \fBprof_attr\fR(4),
153 +\fBattributes\fR(5)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX