2 .\" Copyright (C) 1998-2003, Carnegie Mellon Univeristy. All Rights Reserved.
3 .\" Portions Copyright (C) 2003, Sun Microsystems,
4 .\" Inc. All Rights Reserved
5 .\" 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.
6 .\" 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.
7 .\" 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]
8 .TH SASL_AUXPROP 3SASL "April 9, 2016"
10 sasl_auxprop, prop_new, prop_dup, prop_request, prop_get, prop_getnames,
11 prop_clear, prop_erase, prop_dispose, prop_format, prop_set, prop_setvals \-
12 SASL auxiliary properties
16 \fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... \fB-lsasl\fR [ \fIlibrary\fR ... ]
17 #include <sasl/prop.h>
19 \fBstruct propctx *\fR\fBprop_new\fR(\fBunsigned\fR \fIestimate\fR);
24 \fBint\fR \fBprop_dup\fR(\fBstruct propctx *\fR\fIsrc_ctx\fR, \fBstruct propctx *\fR\fIdst_ctx\fR
29 \fBint\fR \fBprop_request\fR(\fBstruct propctx *\fR\fIctx\fR, \fBconst char **\fR\fInames\fR
34 \fBconst struct propval *\fR\fBprop_get\fR(\fBstruct propctx *\fR\fIctx\fR
39 \fBint\fR \fBprop_getnames\fR(\fBstruct propctx *\fR\fIctx\fR, \fBconst char **\fR\fInames\fR,
40 \fBstruct propval *\fR\fIvals\fR
45 \fBvoid\fR \fBprop_clear\fR(\fBstruct propctx *\fR\fIctx\fR, \fBint\fR \fIrequests\fR
50 \fBvoid\fR \fBprop_erase\fR(\fBstruct propctx *\fR\fIctx\fR, \fBconst char *\fR\fIname\fR
55 \fBvoid\fR \fBprop_dispose\fR(\fBstruct propctx *\fR\fIctx\fR
60 \fBint\fR \fBprop_format\fR(\fBstruct propctx *\fR\fIctx\fR, \fBconst char *\fR\fIsep\fR, \fBint\fR \fIseplen\fR,
61 \fBchar *\fR\fIoutbuf\fR, \fBunsigned\fR \fIoutmax\fR, \fBunsigned *\fR\fIoutlen\fR
66 \fBint\fR \fBprop_set\fR(\fBstruct propctx *\fR\fIctx\fR, \fBconst char *\fR\fIname\fR, \fBconst char *\fR\fIvalue\fR,
67 \fBint\fR \fIvallen\fR
72 \fBint\fR \fBprop_setvals\fR(\fBstruct propctx *\fR\fIctx\fR, \fBconst char *\fR\fIname\fR,
73 \fBconst char **\fR\fIvalues\fR
78 The SASL auxiliary properties are used to obtain properties from external
79 sources during the authentication process. For example, a mechanism might need
80 to query an LDAP server to obtain the authentication secret. The application
81 probably needs other information from the LDAP server as well, such as the home
82 directory of the UID. The auxiliary property interface allows the two to
83 cooperate and results in only a single query against the property sources.
86 Property lookups take place directly after user canonicalization occurs.
87 Therefore, all request should be registered with the context before user
88 canonicalization occurs. Requests can also be registered by using the
89 \fBsasl_auxprop_request\fR(3SASL) function. Most of the auxiliary property
90 functions require a property context that can be obtained by calling
91 \fBsasl_auxprop_getctx\fR(3SASL).
92 .SS "\fBprop_new()\fR"
94 The \fBprop_new()\fR function creates a new property context. It is unlikely
95 that application developers will use this call.
96 .SS "\fBprop_dup()\fR"
98 The \fBprop_dup()\fR function duplicates a given property context.
99 .SS "\fBprop_request()\fR"
101 The \fBprop_request()\fR function adds properties to the request list of a
103 .SS "\fBprop_get()\fR"
105 The \fBprop_get()\fR function returns a null-terminated array of \fBstruct\fR
106 \fBpropval\fR from the given context.
107 .SS "\fBprop_getnames()\fR"
109 The \fBprop_getnames()\fR function fills in an array of \fBstruct\fR
110 \fBpropval\fR based on a list of property names. The \fBvals\fR array is at
111 least as long as the \fBnames\fR array. The values that are filled in by this
112 call persist until the next call on the context to \fBprop_request()\fR,
113 \fBprop_clear()\fR, or \fBprop_dispose()\fR. If a name specified was never
114 requested, then its associated values entry will be set to \fINULL\fR.
117 The \fBprop_getnames()\fR function returns the number of matching properties
118 that were found or a SASL error code.
119 .SS "\fBprop_clear()\fR"
121 The \fBprop_clear()\fR function clears \fIvalues\fR and \fIrequests\fR from a
122 property context. If the value of \fIrequests\fR is \fB1\fR, then
123 \fIrequests\fR is cleared. Otherwise, the value of \fIrequests\fR is \fB0\fR.
124 .SS "\fBprop_erase()\fR"
126 The \fBprop_erase()\fR function securely erases the value of a property.
127 \fIname\fR is the name of the property to erase.
128 .SS "\fBprop_dispose()\fR"
130 The \fBprop_dispose()\fR function disposes of a property context and nullifies
132 .SS "\fBprop_format()\fR"
134 The \fBprop_format()\fR function formats the requested property names into a
135 string. The \fBprop_format()\fR function is not intended to be used by the
136 application. The function is used only by \fBauxprop\fR plug-ins.
137 .SS "\fBprop_set()\fR"
139 The \fBprop_set()\fR functions adds a property value to the context. The
140 \fBprop_set()\fR function is used only by \fBauxprop\fR plug-ins.
141 .SS "\fBprop_setvals()\fR"
143 The \fBprop_setvals()\fR function adds multiple values to a single property.
144 The \fBprop_setvals()\fR function is used only by \fBauxprop\fR plug-ins.
151 The \fBsasl_conn_t\fR for which the request is being made
160 The property context.
169 The estimate of the total storage needed for requests and responses. The
170 library default is implied by a value of \fB0\fR.
179 The null-terminated array of property names. \fInames\fR must persist until the
180 requests are cleared or the context is disposed of with a call to
181 \fBprop_dispose()\fR.
190 The name of the property.
192 For \fBprop_set()\fR, \fIname\fR is the named of the property to receive the
193 new value, or \fINULL\fR. The value will be added to the same property as the
194 last call to either \fBprop_set()\fR or \fBprop_setvals()\fR.
203 The caller-allocated buffer of length \fIoutmax\fR that the resulting string,
204 including the \fINULL\fR terminator, will be placed in.
213 If non-\fINULL\fR, contains the length of the resulting sting, excluding the
214 \fINULL\fR terminator.
223 The maximum length of the output buffer, including the \fINULL\fR terminator.
232 The request list for a given context.
241 The separator to use for the string.
250 The length of the separator. If the value is less than 0, then \fBstrlen\fR
251 will be used to determine the length of \fIsep\fR instead.
260 The length of the property.
278 A value for the property of length \fIvallen\fR.
287 A null-terminated array of values to be added to the property.
292 The \fBsasl_auxprop()\fR functions that return an \fBint\fR will return a SASL
293 error code. See \fBsasl_errors\fR(3SASL). Those \fBsasl_auxprop()\fR functions
294 that return a pointer will return a valid pointer upon success and return
295 \fINULL\fR upon failure.
298 See \fBattributes\fR(5) for descriptions of the following attributes:
306 ATTRIBUTE TYPE ATTRIBUTE VALUE
308 Interface Stability Evolving
315 \fBsasl_auxprop_getctx\fR(3SASL), \fBsasl_auxprop_request\fR(3SASL),
316 \fBsasl_errors\fR(3SASL), \fBattributes\fR(5)