r15547: say goodbye to --with-ldapsam (although the ldapsam_compat passdb backend...
authorGerald Carter <jerry@samba.org>
Fri, 12 May 2006 20:40:22 +0000 (20:40 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 16:16:58 +0000 (11:16 -0500)
source/configure.in
source/param/loadparm.c
source/passdb/pdb_ldap.c

index ca06afc08a166e3c92f052ae90789c9810c2c4b2..21545a34af954c8e854b8ff382e7d22fe1616c0e 100644 (file)
@@ -3936,36 +3936,6 @@ if test x"$samba_cv_HAVE_TRUNCATED_SALT" = x"yes"; then
 fi
 fi
 
-
-########################################################################################
-##
-## TESTS FOR SAM BACKENDS.  KEEP THESE GROUPED TOGETHER
-##
-########################################################################################
-
-#################################################
-# check for a LDAP password database configuration backwards compatibility
-AC_MSG_CHECKING(whether to use LDAP SAM 2.2 compatible configuration)
-AC_ARG_WITH(ldapsam,
-[  --with-ldapsam          Include LDAP SAM 2.2 compatible configuration (default=no)],
-[ case "$withval" in
-  yes)
-    AC_MSG_RESULT(yes)
-    AC_DEFINE(WITH_LDAP_SAMCONFIG,1,[Whether to include 2.2 compatible LDAP SAM configuration])
-    ;;
-  *)
-    AC_MSG_RESULT(no)
-    ;;
-  esac ],
-  AC_MSG_RESULT(no)
-)
-
-########################################################################################
-##
-## END OF TESTS FOR SAM BACKENDS.  
-##
-########################################################################################
-
 #################################################
 # check for a NISPLUS_HOME support 
 AC_MSG_CHECKING(whether to use NISPLUS_HOME)
index 919a482e39c3006f17daf6c6c7f851c95246e289..9c0db5648b110c69e6e1faa33658b566b8bea5f5 100644 (file)
@@ -234,10 +234,6 @@ typedef struct {
        char *szLdapUserSuffix;
        char *szLdapIdmapSuffix;
        char *szLdapGroupSuffix;
-#ifdef WITH_LDAP_SAMCONFIG
-       int ldap_port;
-       char *szLdapServer;
-#endif
        int ldap_ssl;
        char *szLdapSuffix;
        char *szLdapAdminDn;
@@ -671,12 +667,6 @@ static const struct enum_list enum_printing[] = {
 };
 
 static const struct enum_list enum_ldap_ssl[] = {
-#ifdef WITH_LDAP_SAMCONFIG
-       {LDAP_SSL_ON, "Yes"},
-       {LDAP_SSL_ON, "yes"},
-       {LDAP_SSL_ON, "on"},
-       {LDAP_SSL_ON, "On"},
-#endif
        {LDAP_SSL_OFF, "no"},
        {LDAP_SSL_OFF, "No"},
        {LDAP_SSL_OFF, "off"},
@@ -1172,10 +1162,6 @@ static struct parm_struct parm_table[] = {
 
        {N_("Ldap Options"), P_SEP, P_SEPARATOR}, 
 
-#ifdef WITH_LDAP_SAMCONFIG
-       {"ldap server", P_STRING, P_GLOBAL, &Globals.szLdapServer, NULL, NULL, FLAG_ADVANCED}, 
-       {"ldap port", P_INTEGER, P_GLOBAL, &Globals.ldap_port, NULL, NULL, FLAG_ADVANCED}, 
-#endif
        {"ldap admin dn", P_STRING, P_GLOBAL, &Globals.szLdapAdminDn, NULL, NULL, FLAG_ADVANCED}, 
        {"ldap delete dn", P_BOOL, P_GLOBAL, &Globals.ldap_delete_dn, NULL, NULL, FLAG_ADVANCED}, 
        {"ldap group suffix", P_STRING, P_GLOBAL, &Globals.szLdapGroupSuffix, NULL, NULL, FLAG_ADVANCED}, 
@@ -1574,13 +1560,7 @@ static void init_globals(BOOL first_time_only)
           a large number of sites (tridge) */
        Globals.bHostnameLookups = False;
 
-#ifdef WITH_LDAP_SAMCONFIG
-       string_set(&Globals.szLdapServer, "localhost");
-       Globals.ldap_port = 636;
-       string_set(&Globals.szPassdbBackend, "ldapsam_compat");
-#else
        string_set(&Globals.szPassdbBackend, "smbpasswd");
-#endif /* WITH_LDAP_SAMCONFIG */
        string_set(&Globals.szLdapSuffix, "");
        string_set(&Globals.szLdapMachineSuffix, "");
        string_set(&Globals.szLdapUserSuffix, "");
@@ -1857,10 +1837,6 @@ FN_GLOBAL_BOOL(lp_winbind_offline_logon, &Globals.bWinbindOfflineLogon)
 FN_GLOBAL_LIST(lp_idmap_backend, &Globals.szIdmapBackend)
 FN_GLOBAL_BOOL(lp_passdb_expand_explicit, &Globals.bPassdbExpandExplicit)
 
-#ifdef WITH_LDAP_SAMCONFIG
-FN_GLOBAL_STRING(lp_ldap_server, &Globals.szLdapServer)
-FN_GLOBAL_INTEGER(lp_ldap_port, &Globals.ldap_port)
-#endif
 FN_GLOBAL_STRING(lp_ldap_suffix, &Globals.szLdapSuffix)
 FN_GLOBAL_STRING(lp_ldap_admin_dn, &Globals.szLdapAdminDn)
 FN_GLOBAL_INTEGER(lp_ldap_ssl, &Globals.ldap_ssl)
index 20a55ce81156a6a28332f874cb6cbfa80db7d517..24fcd7b39f67c952bd8dc1f61beaa86a710a3bf0 100644 (file)
@@ -5427,23 +5427,6 @@ NTSTATUS pdb_init_ldapsam_compat(struct pdb_methods **pdb_method, const char *lo
        struct ldapsam_privates *ldap_state;
        char *uri = talloc_strdup( NULL, location );
 
-#ifdef WITH_LDAP_SAMCONFIG
-       if (!uri) {
-               int ldap_port = lp_ldap_port();
-                       
-               /* remap default port if not using SSL (ie clear or TLS) */
-               if ( (lp_ldap_ssl() != LDAP_SSL_ON) && (ldap_port == 636) ) {
-                       ldap_port = 389;
-               }
-
-               uri = talloc_asprintf(NULL, "%s://%s:%d", lp_ldap_ssl() == LDAP_SSL_ON ? "ldaps" : "ldap", lp_ldap_server(), ldap_port);
-               if (!uri) {
-                       return NT_STATUS_NO_MEMORY;
-               }
-               location = uri;
-       }
-#endif
-
        if (!NT_STATUS_IS_OK(nt_status = pdb_init_ldapsam_common( pdb_method, uri ))) {
                return nt_status;
        }