2 .\" Copyright (C) 1990, Regents of the University of Michigan. All Rights Reserved.
3 .\" Portions Copyright (C) 2004, Sun Microsystems, Inc. All Rights Reserved.
4 .\" 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.
5 .\" 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.
6 .\" 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]
7 .TH LDAP_GET_OPTION 3LDAP "Jan 15, 2004"
9 ldap_get_option, ldap_set_option \- get or set session preferences in the
14 \fBcc\fR [ \fIflag\fR... ] \fIfile\fR... \fB-lldap\fR [ \fIlibrary\fR... ]
18 \fBLDAP\fR \fBldap_set_option\fR(\fBLDAP\fR \fI*ld\fR, \fBint\fR \fIoption\fR, \fBvoid\fR \fI*optdata\fR[]);
23 \fBLDAP\fR \fBldap_get_option\fR(\fBLDAP\fR \fI*ld\fR, \fBint\fR \fIoption\fR, \fBvoid\fR \fIoptdata\fR[]);
29 These functions provide an \fBLDAP\fR structure with access to session
30 preferences. The \fBldap_get_option()\fR function gets session preferences from
31 the \fBLDAP\fR structure. The \fBldap_set_option()\fR function sets session
32 preferences in the \fBLDAP\fR structure.
35 The \fIld\fR parameter specifies the connection handle, a pointer to an
36 \fBLDAP\fR structure that contains information about the \fBLDAP\fR server
37 connection. The \fIoption\fR parameter specifies the name of the option to be
38 read or modified. The \fIoptdata\fR parameter serves as a pointer to the value
39 of the option that you set or get.
43 The following values can be specified for the \fIoption\fR parameter:
47 \fB\fBLDAP_OPT_API_INFO\fR\fR
51 Retrieves basic information about the \fBLDAP\fR \fBAPI\fR implementation at
52 execution time. The data type for the \fIoptdata\fR parameter is
53 \fB(LDAPAPIInfo *)\fR. This option is READ-ONLY and cannot be set.
59 \fB\fBLDAP_OPT_DEREF\fR\fR
63 Determines how aliases are handled during a search. The data type for the
64 \fIoptdata\fR parameter is \fB(int *)\fR. The following values can be specified
65 for the \fIoptdata\fR parameter:
69 \fB\fBLDAP_DEREF_NEVER\fR\fR
72 Specifies that aliases are never dereferenced.
78 \fB\fBLDAP_DEREF_SEARCHING\fR\fR
81 Specifies that aliases are dereferenced when searching under the base object,
82 but not when finding the base object.
88 \fB\fBLDAP_DEREF_FINDING\fR\fR
91 Specifies that aliases are dereferenced when finding the base object, but not
92 when searching under the base object.
98 \fB\fBLDAP_DEREF_ALWAYS\fR\fR
101 Specifies that aliases are always dereferenced when finding the base object and
102 searching under the base object.
110 \fB\fBLDAP_OPT_SIZELIMIT\fR\fR
114 Specifies the maximum number of entries returned by the server in search
115 results. The data type for the \fIoptdata\fR parameter is \fB(int *)\fR.
116 Setting the \fIoptdata\fR parameter to \fBLDAP_NO_LIMIT\fR removes any size
117 limit enforced by the client.
123 \fB\fBLDAP_OPT_TIMELIMIT\fR\fR
127 Specifies the maximum number of seconds spent by the server when answering a
128 search request. The data type for the \fIoptdata\fR parameter is \fB(int *)\fR.
129 Setting the \fIoptdata\fR parameter to \fBLDAP_NO_LIMIT\fR removes any time
130 limit enforced by the client.
136 \fB\fBLDAP_OPT_REFERRALS\fR\fR
140 Determines whether the client should follow referrals. The data type for the
141 \fIoptdata\fR parameter is \fB(int *)\fR. The following values can be specified
142 for the \fIoptdata\fR parameter:
146 \fB\fBLDAP_OPT_ON\fR\fR
149 Specifies that the client should follow referrals.
155 \fB\fBLDAP_OPT_OFF\fR\fR
158 Specifies that the client should not follow referrals.
161 By default, the client follows referrals.
167 \fB\fBLDAP_OPT_RESTART\fR\fR
171 Determines whether \fBLDAP\fR I/O operations are automatically restarted if
172 aborted prematurely. It can be set to one of the constants \fBLDAP_OPT_ON\fR or
179 \fB\fBLDAP_OPT_PROTOCOL_VERSION\fR\fR
183 Specifies the version of the protocol supported by the client. The data type
184 for the \fIoptdata\fR parameter is \fB(int *)\fR. The version
185 \fBLDAP_VERSION2\fR or \fBLDAP_VERSION3\fR can be specified. If no version is
186 set, the default version \fBLDAP_VERSION2\fR is set. To use \fBLDAP\fR v3
187 features, set the protocol version to \fBLDAP_VERSION3\fR.
193 \fB\fBLDAP_OPT_SERVER_CONTROLS\fR\fR
197 Specifies a pointer to an array of \fBLDAPControl\fR structures that represent
198 the \fBLDAP\fR v3 server controls sent by default with every request. The data
199 type for the \fIoptdata\fR parameter for \fBldap_set_option()\fR is
200 \fB(LDAPControl **)\fR. For \fBldap_get_option()\fR, the data type is
201 \fB(LDAPControl ***)\fR.
207 \fB\fBLDAP_OPT_CLIENT_CONTROLS\fR\fR
211 Specifies a pointer to an array of \fBLDAPControl\fR structures that represent
212 the \fBLDAP\fR v3 client controls sent by default with every request. The data
213 type for the \fIoptdata\fR parameter for \fBldap_set_option()\fR is
214 \fB(LDAPControl **)\fR. For \fBldap_get_option()\fR, the data type is
215 \fB(LDAPControl ***)\fR.
221 \fB\fBLDAP_OPT_API_FEATURE_INFO\fR\fR
225 Retrieves version information at execution time about extended features of the
226 \fBLDAP\fR \fBAPI\fR. The data type for the \fIoptdata\fR parameter is
227 \fB(LDAPAPIFeatureInfo *)\fR. This option is READ-ONLY and cannot be set.
233 \fB\fBLDAP_OPT_HOST_NAME\fR\fR
237 Sets the host name or a list of hosts for the primary \fBLDAP\fR server. The
238 data type for the \fIoptdata\fR parameter for \fBldap_set_option()\fR is
239 \fB(char *)\fR. For \fBldap_get_option()\fR, the data type is \fB(char **)\fR.
245 \fB\fBLDAP_OPT_ERROR_NUMBER\fR\fR
249 Specifies the code of the most recent \fBLDAP\fR error that occurred for this
250 session. The data type for the \fIoptdata\fR parameter is \fB(int *)\fR.
256 \fB\fBLDAP_OPT_ERROR_STRING\fR\fR
260 Specifies the message returned with the most recent \fBLDAP\fR error that
261 occurred for this session. The data type for the \fIoptdata\fR parameter for
262 \fBldap_set_option()\fR is \fB(char *)\fR and for \fBldap_get_option()\fR is
269 \fB\fBLDAP_OPT_MATCHED_DN\fR\fR
273 Specifies the matched \fBDN\fR value returned with the most recent \fBLDAP\fR
274 error that occurred for this session. The data type for the \fIoptdata\fR
275 parameter for \fBldap_set_option()\fR is \fB(char *)\fR and for
276 \fBldap_get_option()\fR is \fB(char **)\fR.
282 \fB\fBLDAP_OPT_REBIND_ARG\fR\fR
286 Sets the last argument passed to the routine specified by
287 \fBLDAP_OPT_REBIND_FN\fR. This option can also be set by calling the
288 \fBldap_set_rebind_proc()\fR function. The data type for the \fIoptdata\fR
289 parameter is \fB(void * )\fR.
295 \fB\fBLDAP_OPT_REBIND_FN\fR\fR
299 Sets the routine to be called to authenticate a connection with another LDAP
300 server. For example, the option is used to set the routine called during the
301 course of a referral. This option can also be by calling the
302 \fBldap_set_rebind_proc()\fR function. The data type for the \fIoptdata\fR
303 parameter is \fB(\fR\fBLDAP_REBINDPROC_CALLBACK\fR\fB *)\fR.
309 \fB\fBLDAP_OPT_X_SASL_MECH\fR\fR
313 Sets the default SASL mechanism to call \fBldap_interactive_bind_s()\fR. The
314 data type for the \fIoptdata\fR parameter is \fB(char * )\fR.
320 \fB\fBLDAP_OPT_X_SASL_REALM\fR\fR
324 Sets the default \fBSASL_REALM\fR. The default \fBSASL_REALM\fR should be used
325 during a SASL challenge in response to a \fBSASL_CB_GETREALM\fR request when
326 using the \fBldap_interactive_bind_s()\fR function. The data type for the
327 \fIoptdata\fR parameter is \fB(char * )\fR.
333 \fB\fBLDAP_OPT_X_SASL_AUTHCID\fR\fR
337 Sets the default \fBSASL_AUTHNAME\fR used during a SASL challenge in response
338 to a \fBSASL_CB_AUTHNAME\fR request when using the
339 \fBldap_interactive_bind_s()\fR function. The data type for the \fIoptdata\fR
340 parameter is \fB(char * )\fR.
346 \fB\fBLDAP_OPT_X_SASL_AUTHZID\fR\fR
350 Sets the default \fBSASL_USER\fR that should be used during a SASL challenge in
351 response to a \fBSASL_CB_USER\fR request when using the
352 \fBldap_interactive_bind_s\fR function. The data type for the \fIoptdata\fR
353 parameter is \fB(char * )\fR.
359 \fB\fBLDAP_OPT_X_SASL_SSF\fR\fR
363 A read-only option used exclusively with the \fBldap_get_option()\fR function.
364 The \fBldap_get_option()\fR function performs a \fBsasl_getprop()\fR operation
365 that gets the \fBSASL_SSF\fR value for the current connection. The data type
366 for the \fIoptdata\fR parameter is \fB(sasl_ssf_t * )\fR.
372 \fB\fBLDAP_OPT_X_SASL_SSF_EXTERNAL\fR\fR
376 A write-only option used exclusively with the \fBldap_set_option()\fR function.
377 The \fBldap_set_option()\fR function performs a \fBsasl_setprop()\fR operation
378 to set the \fBSASL_SSF_EXTERNAL\fR value for the current connection. The data
379 type for the \fIoptdata\fR parameter is \fB(sasl_ssf_t * )\fR.
385 \fB\fBLDAP_OPT_X_SASL_SECPROPS\fR\fR
389 A write-only option used exclusively with the \fBldap_set_option()\fR. This
390 function performs a \fBsasl_setprop\fR(3SASL) operation for the
391 \fBSASL_SEC_PROPS\fR value for the current connection during an
392 \fBldap_interactive_bind_s()\fR operation. The data type for the \fIoptdata\fR
393 parameter is \fB(char * )\fR, a comma delimited string containing text values
394 for any of the \fBSASL_SEC_PROPS\fR that should be set. The text values are:
398 \fB\fBnoanonymous\fR\fR
401 Sets the \fBSASL_SEC_NOANONYMOUS\fR flag
410 Sets the \fBSASL_SEC_NODICTIONARY\fR flag
419 Sets the \fBSASL_SEC_NOPLAINTEXT\fR flag
425 \fB\fBforwardsec\fR\fR
428 Sets the \fBSASL_SEC_FORWARD_SECRECY\fR flag
437 Sets the \fBSASL_SEC_PASS_CREDENTIALS\fR flag
446 Sets \fBminssf\fR to the integer value \fBN\fR
455 Sets \fBmaxssf\fR to the integer value \fBN\fR
461 \fB\fBmaxbufsize=N\fR\fR
464 Sets \fBmaxbufsize\fR to the integer value \fBN\fR
472 \fB\fBLDAP_OPT_X_SASL_SSF_MIN\fR\fR
476 Sets the default \fBSSF_MIN\fR value used during a
477 \fBldap_interactive_bind_s()\fR operation. The data type for the \fIoptdata\fR
478 parameter is \fB(char * )\fR numeric string.
484 \fB\fBLDAP_OPT_X_SASL_SSF_MAX\fR\fR
488 Sets the default \fBSSF_MAX\fR value used during a
489 \fBldap_interactive_bind_s()\fR operation. The data type for the \fIoptdata\fR
490 parameter is \fB(char * )\fR numeric string.
496 \fB\fBLDAP_OPT_X_SASL_MAXBUFSIZE\fR\fR
500 Sets the default \fBSSF_MAXBUFSIZE\fR value used during a
501 \fBldap_interactive_bind_s()\fR operation. The data type for the \fIoptdata\fR
502 parameter is \fB(char * )\fR numeric string.
508 The \fBldap_set_option()\fR and \fBldap_get_option()\fR functions return:
512 \fB\fBLDAP_SUCCESS\fR\fR
530 See \fBattributes\fR(5) for descriptions of the following attributes:
538 ATTRIBUTE TYPE ATTRIBUTE VALUE
540 Interface Stability Evolving
548 \fBldap_init\fR(3LDAP), \fBsasl_setprop\fR(3SASL), \fBattributes\fR(5)
552 There are other elements in the \fBLDAP\fR structure that should not be
553 changed. No assumptions should be made about the order of elements in the
554 \fBLDAP\fR structure.