wbemdisp: Implement GetObjectText_().
[wine/zf.git] / dlls / wldap32 / option.c
blob388432a442c3973c5cf8a0f4ebb827f8c275bb81
1 /*
2 * WLDAP32 - LDAP support for Wine
4 * Copyright 2005 Hans Leidekker
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #include "config.h"
22 #include "wine/port.h"
24 #include <stdarg.h>
25 #ifdef HAVE_LDAP_H
26 #include <ldap.h>
27 #endif
29 #include "windef.h"
30 #include "winbase.h"
31 #include "winnls.h"
33 #include "winldap_private.h"
34 #include "wldap32.h"
35 #include "wine/debug.h"
37 #ifdef HAVE_LDAP
38 WINE_DEFAULT_DEBUG_CHANNEL(wldap32);
39 #endif
41 /***********************************************************************
42 * ldap_get_optionA (WLDAP32.@)
44 * See ldap_get_optionW.
46 ULONG CDECL ldap_get_optionA( WLDAP32_LDAP *ld, int option, void *value )
48 ULONG ret = WLDAP32_LDAP_NOT_SUPPORTED;
49 #ifdef HAVE_LDAP
51 TRACE( "(%p, 0x%08x, %p)\n", ld, option, value );
53 if (!ld || !value) return WLDAP32_LDAP_PARAM_ERROR;
55 switch (option)
57 case WLDAP32_LDAP_OPT_API_FEATURE_INFO:
59 LDAPAPIFeatureInfoW featureW;
60 LDAPAPIFeatureInfoA *featureA = value;
62 if (!featureA->ldapaif_name) return WLDAP32_LDAP_PARAM_ERROR;
64 featureW.ldapaif_info_version = featureA->ldapaif_info_version;
65 featureW.ldapaif_name = strAtoW( featureA->ldapaif_name );
66 featureW.ldapaif_version = 0;
68 if (!featureW.ldapaif_name) return WLDAP32_LDAP_NO_MEMORY;
70 ret = ldap_get_optionW( ld, option, &featureW );
72 featureA->ldapaif_version = featureW.ldapaif_version;
73 strfreeW( featureW.ldapaif_name );
74 return ret;
76 case WLDAP32_LDAP_OPT_API_INFO:
78 LDAPAPIInfoW infoW;
79 LDAPAPIInfoA *infoA = value;
81 memset( &infoW, 0, sizeof(LDAPAPIInfoW) );
82 infoW.ldapai_info_version = infoA->ldapai_info_version;
84 ret = ldap_get_optionW( ld, option, &infoW );
86 infoA->ldapai_api_version = infoW.ldapai_api_version;
87 infoA->ldapai_protocol_version = infoW.ldapai_protocol_version;
89 if (infoW.ldapai_extensions)
91 infoA->ldapai_extensions = strarrayWtoA( infoW.ldapai_extensions );
92 if (!infoA->ldapai_extensions) return WLDAP32_LDAP_NO_MEMORY;
94 if (infoW.ldapai_vendor_name)
96 infoA->ldapai_vendor_name = strWtoA( infoW.ldapai_vendor_name );
97 if (!infoA->ldapai_vendor_name)
99 ldap_value_freeW( infoW.ldapai_extensions );
100 return WLDAP32_LDAP_NO_MEMORY;
103 infoA->ldapai_vendor_version = infoW.ldapai_vendor_version;
105 ldap_value_freeW( infoW.ldapai_extensions );
106 ldap_memfreeW( infoW.ldapai_vendor_name );
107 return ret;
110 case WLDAP32_LDAP_OPT_DEREF:
111 case WLDAP32_LDAP_OPT_DESC:
112 case WLDAP32_LDAP_OPT_ERROR_NUMBER:
113 case WLDAP32_LDAP_OPT_PROTOCOL_VERSION:
114 case WLDAP32_LDAP_OPT_REFERRALS:
115 case WLDAP32_LDAP_OPT_SIZELIMIT:
116 case WLDAP32_LDAP_OPT_TIMELIMIT:
117 return ldap_get_optionW( ld, option, value );
119 case WLDAP32_LDAP_OPT_CACHE_ENABLE:
120 case WLDAP32_LDAP_OPT_CACHE_FN_PTRS:
121 case WLDAP32_LDAP_OPT_CACHE_STRATEGY:
122 case WLDAP32_LDAP_OPT_IO_FN_PTRS:
123 case WLDAP32_LDAP_OPT_REBIND_ARG:
124 case WLDAP32_LDAP_OPT_REBIND_FN:
125 case WLDAP32_LDAP_OPT_RESTART:
126 case WLDAP32_LDAP_OPT_THREAD_FN_PTRS:
127 return LDAP_LOCAL_ERROR;
129 case WLDAP32_LDAP_OPT_AREC_EXCLUSIVE:
130 case WLDAP32_LDAP_OPT_AUTO_RECONNECT:
131 case WLDAP32_LDAP_OPT_CLIENT_CERTIFICATE:
132 case WLDAP32_LDAP_OPT_DNSDOMAIN_NAME:
133 case WLDAP32_LDAP_OPT_ENCRYPT:
134 case WLDAP32_LDAP_OPT_ERROR_STRING:
135 case WLDAP32_LDAP_OPT_FAST_CONCURRENT_BIND:
136 case WLDAP32_LDAP_OPT_GETDSNAME_FLAGS:
137 case WLDAP32_LDAP_OPT_HOST_NAME:
138 case WLDAP32_LDAP_OPT_HOST_REACHABLE:
139 case WLDAP32_LDAP_OPT_PING_KEEP_ALIVE:
140 case WLDAP32_LDAP_OPT_PING_LIMIT:
141 case WLDAP32_LDAP_OPT_PING_WAIT_TIME:
142 case WLDAP32_LDAP_OPT_PROMPT_CREDENTIALS:
143 case WLDAP32_LDAP_OPT_REF_DEREF_CONN_PER_MSG:
144 case WLDAP32_LDAP_OPT_REFERRAL_CALLBACK:
145 case WLDAP32_LDAP_OPT_REFERRAL_HOP_LIMIT:
146 case WLDAP32_LDAP_OPT_ROOTDSE_CACHE:
147 case WLDAP32_LDAP_OPT_SASL_METHOD:
148 case WLDAP32_LDAP_OPT_SECURITY_CONTEXT:
149 case WLDAP32_LDAP_OPT_SEND_TIMEOUT:
150 case WLDAP32_LDAP_OPT_SERVER_CERTIFICATE:
151 case WLDAP32_LDAP_OPT_SERVER_CONTROLS:
152 case WLDAP32_LDAP_OPT_SERVER_ERROR:
153 case WLDAP32_LDAP_OPT_SERVER_EXT_ERROR:
154 case WLDAP32_LDAP_OPT_SIGN:
155 case WLDAP32_LDAP_OPT_SSL:
156 case WLDAP32_LDAP_OPT_SSL_INFO:
157 case WLDAP32_LDAP_OPT_SSPI_FLAGS:
158 case WLDAP32_LDAP_OPT_TCP_KEEPALIVE:
159 FIXME( "Unsupported option: 0x%02x\n", option );
160 return WLDAP32_LDAP_NOT_SUPPORTED;
162 default:
163 FIXME( "Unknown option: 0x%02x\n", option );
164 return WLDAP32_LDAP_LOCAL_ERROR;
167 #endif
168 return ret;
171 /***********************************************************************
172 * ldap_get_optionW (WLDAP32.@)
174 * Retrieve option values for a given LDAP context.
176 * PARAMS
177 * ld [I] Pointer to an LDAP context.
178 * option [I] Option to get values for.
179 * value [O] Pointer to option values.
181 * RETURNS
182 * Success: LDAP_SUCCESS
183 * Failure: An LDAP error code.
185 ULONG CDECL ldap_get_optionW( WLDAP32_LDAP *ld, int option, void *value )
187 ULONG ret = WLDAP32_LDAP_NOT_SUPPORTED;
188 #ifdef HAVE_LDAP
190 TRACE( "(%p, 0x%08x, %p)\n", ld, option, value );
192 if (!ld || !value) return WLDAP32_LDAP_PARAM_ERROR;
194 switch (option)
196 case WLDAP32_LDAP_OPT_API_FEATURE_INFO:
198 LDAPAPIFeatureInfo featureU;
199 LDAPAPIFeatureInfoW *featureW = value;
201 if (!featureW->ldapaif_name) return WLDAP32_LDAP_PARAM_ERROR;
203 featureU.ldapaif_info_version = featureW->ldapaif_info_version;
204 featureU.ldapaif_name = strWtoU( featureW->ldapaif_name );
205 featureU.ldapaif_version = 0;
207 if (!featureU.ldapaif_name) return WLDAP32_LDAP_NO_MEMORY;
209 ret = map_error( ldap_get_option( ld->ld, option, &featureU ));
211 featureW->ldapaif_version = featureU.ldapaif_version;
212 strfreeU( featureU.ldapaif_name );
213 return ret;
215 case WLDAP32_LDAP_OPT_API_INFO:
217 LDAPAPIInfo infoU;
218 LDAPAPIInfoW *infoW = value;
220 memset( &infoU, 0, sizeof(LDAPAPIInfo) );
221 infoU.ldapai_info_version = infoW->ldapai_info_version;
223 ret = map_error( ldap_get_option( ld->ld, option, &infoU ));
225 infoW->ldapai_api_version = infoU.ldapai_api_version;
226 infoW->ldapai_protocol_version = infoU.ldapai_protocol_version;
228 if (infoU.ldapai_extensions)
230 infoW->ldapai_extensions = strarrayUtoW( infoU.ldapai_extensions );
231 if (!infoW->ldapai_extensions) return WLDAP32_LDAP_NO_MEMORY;
233 if (infoU.ldapai_vendor_name)
235 infoW->ldapai_vendor_name = strUtoW( infoU.ldapai_vendor_name );
236 if (!infoW->ldapai_vendor_name)
238 ldap_memvfree( (void **)infoU.ldapai_extensions );
239 return WLDAP32_LDAP_NO_MEMORY;
242 infoW->ldapai_vendor_version = infoU.ldapai_vendor_version;
244 ldap_memvfree( (void **)infoU.ldapai_extensions );
245 ldap_memfree( infoU.ldapai_vendor_name );
246 return ret;
249 case WLDAP32_LDAP_OPT_DEREF:
250 case WLDAP32_LDAP_OPT_DESC:
251 case WLDAP32_LDAP_OPT_ERROR_NUMBER:
252 case WLDAP32_LDAP_OPT_PROTOCOL_VERSION:
253 case WLDAP32_LDAP_OPT_REFERRALS:
254 case WLDAP32_LDAP_OPT_SIZELIMIT:
255 case WLDAP32_LDAP_OPT_TIMELIMIT:
256 return map_error( ldap_get_option( ld->ld, option, value ));
258 case WLDAP32_LDAP_OPT_CACHE_ENABLE:
259 case WLDAP32_LDAP_OPT_CACHE_FN_PTRS:
260 case WLDAP32_LDAP_OPT_CACHE_STRATEGY:
261 case WLDAP32_LDAP_OPT_IO_FN_PTRS:
262 case WLDAP32_LDAP_OPT_REBIND_ARG:
263 case WLDAP32_LDAP_OPT_REBIND_FN:
264 case WLDAP32_LDAP_OPT_RESTART:
265 case WLDAP32_LDAP_OPT_THREAD_FN_PTRS:
266 return WLDAP32_LDAP_LOCAL_ERROR;
268 case WLDAP32_LDAP_OPT_AREC_EXCLUSIVE:
269 case WLDAP32_LDAP_OPT_AUTO_RECONNECT:
270 case WLDAP32_LDAP_OPT_CLIENT_CERTIFICATE:
271 case WLDAP32_LDAP_OPT_DNSDOMAIN_NAME:
272 case WLDAP32_LDAP_OPT_ENCRYPT:
273 case WLDAP32_LDAP_OPT_ERROR_STRING:
274 case WLDAP32_LDAP_OPT_FAST_CONCURRENT_BIND:
275 case WLDAP32_LDAP_OPT_GETDSNAME_FLAGS:
276 case WLDAP32_LDAP_OPT_HOST_NAME:
277 case WLDAP32_LDAP_OPT_HOST_REACHABLE:
278 case WLDAP32_LDAP_OPT_PING_KEEP_ALIVE:
279 case WLDAP32_LDAP_OPT_PING_LIMIT:
280 case WLDAP32_LDAP_OPT_PING_WAIT_TIME:
281 case WLDAP32_LDAP_OPT_PROMPT_CREDENTIALS:
282 case WLDAP32_LDAP_OPT_REF_DEREF_CONN_PER_MSG:
283 case WLDAP32_LDAP_OPT_REFERRAL_CALLBACK:
284 case WLDAP32_LDAP_OPT_REFERRAL_HOP_LIMIT:
285 case WLDAP32_LDAP_OPT_ROOTDSE_CACHE:
286 case WLDAP32_LDAP_OPT_SASL_METHOD:
287 case WLDAP32_LDAP_OPT_SECURITY_CONTEXT:
288 case WLDAP32_LDAP_OPT_SEND_TIMEOUT:
289 case WLDAP32_LDAP_OPT_SERVER_CERTIFICATE:
290 case WLDAP32_LDAP_OPT_SERVER_CONTROLS:
291 case WLDAP32_LDAP_OPT_SERVER_ERROR:
292 case WLDAP32_LDAP_OPT_SERVER_EXT_ERROR:
293 case WLDAP32_LDAP_OPT_SIGN:
294 case WLDAP32_LDAP_OPT_SSL:
295 case WLDAP32_LDAP_OPT_SSL_INFO:
296 case WLDAP32_LDAP_OPT_SSPI_FLAGS:
297 case WLDAP32_LDAP_OPT_TCP_KEEPALIVE:
298 FIXME( "Unsupported option: 0x%02x\n", option );
299 return WLDAP32_LDAP_NOT_SUPPORTED;
301 default:
302 FIXME( "Unknown option: 0x%02x\n", option );
303 return WLDAP32_LDAP_LOCAL_ERROR;
306 #endif
307 return ret;
310 /***********************************************************************
311 * ldap_set_optionA (WLDAP32.@)
313 * See ldap_set_optionW.
315 ULONG CDECL ldap_set_optionA( WLDAP32_LDAP *ld, int option, void *value )
317 ULONG ret = WLDAP32_LDAP_NOT_SUPPORTED;
318 #ifdef HAVE_LDAP
320 TRACE( "(%p, 0x%08x, %p)\n", ld, option, value );
322 if (!ld) return WLDAP32_LDAP_PARAM_ERROR;
324 switch (option)
326 case WLDAP32_LDAP_OPT_SERVER_CONTROLS:
328 LDAPControlW **ctrlsW;
330 ctrlsW = controlarrayAtoW( value );
331 if (!ctrlsW) return WLDAP32_LDAP_NO_MEMORY;
333 ret = ldap_set_optionW( ld, option, ctrlsW );
334 controlarrayfreeW( ctrlsW );
335 return ret;
337 case WLDAP32_LDAP_OPT_DEREF:
338 case WLDAP32_LDAP_OPT_DESC:
339 case WLDAP32_LDAP_OPT_ERROR_NUMBER:
340 case WLDAP32_LDAP_OPT_PROTOCOL_VERSION:
341 case WLDAP32_LDAP_OPT_REFERRALS:
342 case WLDAP32_LDAP_OPT_SIZELIMIT:
343 case WLDAP32_LDAP_OPT_TIMELIMIT:
344 return ldap_set_optionW( ld, option, value );
346 case WLDAP32_LDAP_OPT_CACHE_ENABLE:
347 case WLDAP32_LDAP_OPT_CACHE_FN_PTRS:
348 case WLDAP32_LDAP_OPT_CACHE_STRATEGY:
349 case WLDAP32_LDAP_OPT_IO_FN_PTRS:
350 case WLDAP32_LDAP_OPT_REBIND_ARG:
351 case WLDAP32_LDAP_OPT_REBIND_FN:
352 case WLDAP32_LDAP_OPT_RESTART:
353 case WLDAP32_LDAP_OPT_THREAD_FN_PTRS:
354 return WLDAP32_LDAP_LOCAL_ERROR;
356 case WLDAP32_LDAP_OPT_API_FEATURE_INFO:
357 case WLDAP32_LDAP_OPT_API_INFO:
358 return WLDAP32_LDAP_UNWILLING_TO_PERFORM;
360 case WLDAP32_LDAP_OPT_AREC_EXCLUSIVE:
361 case WLDAP32_LDAP_OPT_AUTO_RECONNECT:
362 case WLDAP32_LDAP_OPT_CLIENT_CERTIFICATE:
363 case WLDAP32_LDAP_OPT_DNSDOMAIN_NAME:
364 case WLDAP32_LDAP_OPT_ENCRYPT:
365 case WLDAP32_LDAP_OPT_ERROR_STRING:
366 case WLDAP32_LDAP_OPT_FAST_CONCURRENT_BIND:
367 case WLDAP32_LDAP_OPT_GETDSNAME_FLAGS:
368 case WLDAP32_LDAP_OPT_HOST_NAME:
369 case WLDAP32_LDAP_OPT_HOST_REACHABLE:
370 case WLDAP32_LDAP_OPT_PING_KEEP_ALIVE:
371 case WLDAP32_LDAP_OPT_PING_LIMIT:
372 case WLDAP32_LDAP_OPT_PING_WAIT_TIME:
373 case WLDAP32_LDAP_OPT_PROMPT_CREDENTIALS:
374 case WLDAP32_LDAP_OPT_REF_DEREF_CONN_PER_MSG:
375 case WLDAP32_LDAP_OPT_REFERRAL_CALLBACK:
376 case WLDAP32_LDAP_OPT_REFERRAL_HOP_LIMIT:
377 case WLDAP32_LDAP_OPT_ROOTDSE_CACHE:
378 case WLDAP32_LDAP_OPT_SASL_METHOD:
379 case WLDAP32_LDAP_OPT_SECURITY_CONTEXT:
380 case WLDAP32_LDAP_OPT_SEND_TIMEOUT:
381 case WLDAP32_LDAP_OPT_SERVER_CERTIFICATE:
382 case WLDAP32_LDAP_OPT_SERVER_ERROR:
383 case WLDAP32_LDAP_OPT_SERVER_EXT_ERROR:
384 case WLDAP32_LDAP_OPT_SIGN:
385 case WLDAP32_LDAP_OPT_SSL:
386 case WLDAP32_LDAP_OPT_SSL_INFO:
387 case WLDAP32_LDAP_OPT_SSPI_FLAGS:
388 case WLDAP32_LDAP_OPT_TCP_KEEPALIVE:
389 FIXME( "Unsupported option: 0x%02x\n", option );
390 return WLDAP32_LDAP_NOT_SUPPORTED;
392 default:
393 FIXME( "Unknown option: 0x%02x\n", option );
394 return WLDAP32_LDAP_LOCAL_ERROR;
397 #endif
398 return ret;
401 #ifdef HAVE_LDAP
403 static BOOL query_supported_server_ctrls( WLDAP32_LDAP *ld )
405 char *attrs[] = { (char *)"supportedControl", NULL };
406 LDAPMessage *res, *entry;
408 if ( ld->ld_server_ctrls ) return TRUE;
410 if (ldap_search_ext_s( ld->ld, (char *)"", LDAP_SCOPE_BASE, (char *)"(objectClass=*)", attrs, FALSE,
411 NULL, NULL, NULL, 0, &res ) != LDAP_SUCCESS)
412 return FALSE;
414 entry = ldap_first_entry( ld->ld, res );
415 if (entry)
417 ULONG count, i;
419 ld->ld_server_ctrls = ldap_get_values_len( ld->ld, entry, attrs[0] );
420 count = ldap_count_values_len( ld->ld_server_ctrls );
421 for (i = 0; i < count; i++)
422 TRACE("%u: %s\n", i, debugstr_an( ld->ld_server_ctrls[i]->bv_val, ld->ld_server_ctrls[i]->bv_len ));
425 ldap_msgfree( res );
427 return ld->ld_server_ctrls != NULL;
430 static BOOL is_supported_server_ctrls( WLDAP32_LDAP *ld, LDAPControl **ctrls )
432 ULONG user_count, server_count, i, n, supported = 0;
434 if (!query_supported_server_ctrls( ld ))
435 return TRUE; /* can't verify, let the server handle it on next query */
437 user_count = controlarraylenU( ctrls );
438 server_count = ldap_count_values_len( ld->ld_server_ctrls );
440 for (n = 0; n < user_count; n++)
442 TRACE("looking for %s\n", debugstr_a(ctrls[n]->ldctl_oid));
444 for (i = 0; i < server_count; i++)
446 if (!strncmp( ctrls[n]->ldctl_oid, ld->ld_server_ctrls[i]->bv_val, ld->ld_server_ctrls[i]->bv_len))
448 supported++;
449 break;
454 return supported == user_count;
456 #endif
458 /***********************************************************************
459 * ldap_set_optionW (WLDAP32.@)
461 * Set option values for a given LDAP context.
463 * PARAMS
464 * ld [I] Pointer to an LDAP context.
465 * option [I] Option to set values for.
466 * value [I] Pointer to option values.
468 * RETURNS
469 * Success: LDAP_SUCCESS
470 * Failure: An LDAP error code.
472 * NOTES
473 * Set value to LDAP_OPT_ON or LDAP_OPT_OFF for on/off options.
475 ULONG CDECL ldap_set_optionW( WLDAP32_LDAP *ld, int option, void *value )
477 ULONG ret = WLDAP32_LDAP_NOT_SUPPORTED;
478 #ifdef HAVE_LDAP
480 TRACE( "(%p, 0x%08x, %p)\n", ld, option, value );
482 if (!ld) return WLDAP32_LDAP_PARAM_ERROR;
484 switch (option)
486 case WLDAP32_LDAP_OPT_SERVER_CONTROLS:
488 LDAPControl **ctrlsU;
490 ctrlsU = controlarrayWtoU( value );
491 if (!ctrlsU) return WLDAP32_LDAP_NO_MEMORY;
493 if (!is_supported_server_ctrls( ld, ctrlsU ))
494 ret = WLDAP32_LDAP_PARAM_ERROR;
495 else
496 ret = map_error( ldap_set_option( ld->ld, option, ctrlsU ));
497 controlarrayfreeU( ctrlsU );
498 return ret;
500 case WLDAP32_LDAP_OPT_REFERRALS:
502 void *openldap_referral = LDAP_OPT_ON;
503 if (value == LDAP_OPT_OFF)
504 openldap_referral = LDAP_OPT_OFF;
505 else
506 FIXME("upgrading referral value %p to LDAP_OPT_ON (OpenLDAP lacks sufficient granularity)\n", value);
507 return map_error( ldap_set_option( ld->ld, option, openldap_referral ));
508 break;
510 case WLDAP32_LDAP_OPT_DEREF:
511 case WLDAP32_LDAP_OPT_DESC:
512 case WLDAP32_LDAP_OPT_ERROR_NUMBER:
513 case WLDAP32_LDAP_OPT_PROTOCOL_VERSION:
514 case WLDAP32_LDAP_OPT_SIZELIMIT:
515 case WLDAP32_LDAP_OPT_TIMELIMIT:
516 return map_error( ldap_set_option( ld->ld, option, value ));
518 case WLDAP32_LDAP_OPT_CACHE_ENABLE:
519 case WLDAP32_LDAP_OPT_CACHE_FN_PTRS:
520 case WLDAP32_LDAP_OPT_CACHE_STRATEGY:
521 case WLDAP32_LDAP_OPT_IO_FN_PTRS:
522 case WLDAP32_LDAP_OPT_REBIND_ARG:
523 case WLDAP32_LDAP_OPT_REBIND_FN:
524 case WLDAP32_LDAP_OPT_RESTART:
525 case WLDAP32_LDAP_OPT_THREAD_FN_PTRS:
526 return WLDAP32_LDAP_LOCAL_ERROR;
528 case WLDAP32_LDAP_OPT_API_FEATURE_INFO:
529 case WLDAP32_LDAP_OPT_API_INFO:
530 return WLDAP32_LDAP_UNWILLING_TO_PERFORM;
532 case WLDAP32_LDAP_OPT_AREC_EXCLUSIVE:
533 case WLDAP32_LDAP_OPT_AUTO_RECONNECT:
534 case WLDAP32_LDAP_OPT_CLIENT_CERTIFICATE:
535 case WLDAP32_LDAP_OPT_DNSDOMAIN_NAME:
536 case WLDAP32_LDAP_OPT_ENCRYPT:
537 case WLDAP32_LDAP_OPT_ERROR_STRING:
538 case WLDAP32_LDAP_OPT_FAST_CONCURRENT_BIND:
539 case WLDAP32_LDAP_OPT_GETDSNAME_FLAGS:
540 case WLDAP32_LDAP_OPT_HOST_NAME:
541 case WLDAP32_LDAP_OPT_HOST_REACHABLE:
542 case WLDAP32_LDAP_OPT_PING_KEEP_ALIVE:
543 case WLDAP32_LDAP_OPT_PING_LIMIT:
544 case WLDAP32_LDAP_OPT_PING_WAIT_TIME:
545 case WLDAP32_LDAP_OPT_PROMPT_CREDENTIALS:
546 case WLDAP32_LDAP_OPT_REF_DEREF_CONN_PER_MSG:
547 case WLDAP32_LDAP_OPT_REFERRAL_CALLBACK:
548 case WLDAP32_LDAP_OPT_REFERRAL_HOP_LIMIT:
549 case WLDAP32_LDAP_OPT_ROOTDSE_CACHE:
550 case WLDAP32_LDAP_OPT_SASL_METHOD:
551 case WLDAP32_LDAP_OPT_SECURITY_CONTEXT:
552 case WLDAP32_LDAP_OPT_SEND_TIMEOUT:
553 case WLDAP32_LDAP_OPT_SERVER_CERTIFICATE:
554 case WLDAP32_LDAP_OPT_SERVER_ERROR:
555 case WLDAP32_LDAP_OPT_SERVER_EXT_ERROR:
556 case WLDAP32_LDAP_OPT_SIGN:
557 case WLDAP32_LDAP_OPT_SSL:
558 case WLDAP32_LDAP_OPT_SSL_INFO:
559 case WLDAP32_LDAP_OPT_SSPI_FLAGS:
560 case WLDAP32_LDAP_OPT_TCP_KEEPALIVE:
561 FIXME( "Unsupported option: 0x%02x\n", option );
562 return WLDAP32_LDAP_NOT_SUPPORTED;
564 default:
565 FIXME( "Unknown option: 0x%02x\n", option );
566 return WLDAP32_LDAP_LOCAL_ERROR;
569 #endif
570 return ret;