2N/A/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */ 2N/A * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. 2N/A * Copyright (c) 2004-2005, Novell, Inc. 2N/A * All rights reserved. 2N/A * Redistribution and use in source and binary forms, with or without 2N/A * modification, are permitted provided that the following conditions are met: 2N/A * * Redistributions of source code must retain the above copyright notice, 2N/A * this list of conditions and the following disclaimer. 2N/A * * Redistributions in binary form must reproduce the above copyright 2N/A * notice, this list of conditions and the following disclaimer in the 2N/A * documentation and/or other materials provided with the distribution. 2N/A * * The copyright holder's name is not used to endorse or promote products 2N/A * derived from this software without specific prior written permission. 2N/A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 2N/A * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2N/A * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2N/A * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 2N/A * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 2N/A * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 2N/A * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 2N/A * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 2N/A * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 2N/A * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 2N/A * POSSIBILITY OF SUCH DAMAGE. 2N/A/* Solaris Kerberos */ 2N/A /* ignore trailing blanks */ 2N/A * read startup information - kerberos and realm container 2N/A * Interrogate the root DSE (zero length DN) for an attribute 2N/A * Solaris Kerberos: don't use SSL since we are checking to see if SASL 2N/A * Externnal mech is supported. 2N/A /* Solaris Kerberos: anon bind not needed */ 2N/A#
if 0
/************** Begin IFDEF'ed OUT *******************************/ 2N/A /* Anonymous bind */ 2N/A#
endif /**************** END IFDEF'ed OUT *******************************/ 2N/A retval =
ldap_search_ext_s(
ld,
"",
LDAP_SCOPE_BASE,
NULL,
attrs, 0,
NULL,
NULL,
NULL, 0, &
res);
2N/A#
if 0
/************** Begin IFDEF'ed OUT *******************************/ 2N/A /* Solaris Kerberos: more accurate */ 2N/A#
endif /**************** END IFDEF'ed OUT *******************************/ 2N/A#
define ERR_MSG1 "Unable to check if SASL EXTERNAL mechanism is supported by LDAP server. Proceeding anyway ..." 2N/A#
define ERR_MSG2 "SASL EXTERNAL mechanism not supported by LDAP server. Can't perform certificate-based bind." 2N/A/* Function to check if a LDAP server supports the SASL external mechanism 2N/A * 1 => does not support 2N/A "supportedSASLMechanisms",
"EXTERNAL");
2N/A case 1:
/* not supported */ 2N/A case 2:
/* don't know */ 2N/A "supportedFeatures",
"1.3.6.1.1.14");
2N/A /* Clear the global error string */ 2N/A /* ignore hash argument. Might have been passed from create */ 2N/A * temporary is passed in when kdb5_util load without -update is done. 2N/A * This is unsupported by the LDAP plugin. 2N/A gettext(
"open of LDAP directory aborted, plugin requires -update argument"));
2N/A /* Solaris Kerberos */ 2N/A /* Solaris Kerberos */ 2N/A /* may be clearing up is not required db_fini might do it for us, check out */ 2N/A * This code path can be called before 2N/A * dal_handle->db_context == ldap_context in which case ldap_context 2N/A * should be freed. After dal_handle->db_context == ldap_context 2N/A * ldap_context will be set to NULL and the memory cleaned up by 2N/A * krb5_ldap_free_ldap_context() (via the context argument). 2N/A /* Solaris Kerberos: Memleak */ 2N/A /* Global (per-module) initialization. */