From 7195dad7c26d20f02bb32cff46778b091be8243a Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Wed, 26 Dec 2001 19:10:13 +0000 Subject: [PATCH] Zap configinfo and cleanup unused defaults --- include/ldap_defaults.h | 93 ---------------------------------- servers/slapd/Makefile.in | 4 +- servers/slapd/configinfo.c | 100 ------------------------------------- 3 files changed, 2 insertions(+), 195 deletions(-) delete mode 100644 servers/slapd/configinfo.c diff --git a/include/ldap_defaults.h b/include/ldap_defaults.h index 9f25a6e8f9..d453f67c3d 100644 --- a/include/ldap_defaults.h +++ b/include/ldap_defaults.h @@ -48,8 +48,6 @@ #define DEFAULT_RDNCOUNT 2 /* default config file locations */ #define FILTERFILE LDAP_SYSCONFDIR LDAP_DIRSEP "ldapfilter.conf" -#define TEMPLATEFILE LDAP_SYSCONFDIR LDAP_DIRSEP "ldaptemplates.conf" -#define SEARCHFILE LDAP_SYSCONFDIR LDAP_DIRSEP "ldapsearchprefs.conf" /* * FINGER DEFINITIONS @@ -87,75 +85,6 @@ Please try again later.\r\n" /* number of DN components to show in entry displays */ #define FINGER_RDNCOUNT DEFAULT_RDNCOUNT -/* - * GO500 GOPHER GATEWAY DEFINITIONS - */ - /* port on which to listen */ -#define GO500_PORT 5555 - /* how to handle aliases */ -#define GO500_DEREF LDAP_DEREF_FINDING - /* attribute to use when sorting results */ -#define GO500_SORT_ATTR SORT_ATTR - /* timeout for searches */ -#define GO500_TIMEOUT 180 -#ifdef LDAP_UFN - /* enable ufn support */ -#define GO500_UFN -#endif - /* - * only set and uncomment this if your hostname() does not return - * a fully qualified hostname - */ -/* #define GO500_HOSTNAME "fully.qualified.hostname.here" */ - /* number of DN components to show in entry displays */ -#define GO500_RDNCOUNT DEFAULT_RDNCOUNT - -/* - * GO500GW GOPHER GATEWAY DEFINITIONS - */ - /* where the helpfile lives */ -#define GO500GW_HELPFILE LDAP_DATADIR LDAP_DIRSEP "go500gw.help" - /* port on which to listen */ -#define GO500GW_PORT 7777 - /* timeout on all searches */ -#define GO500GW_TIMEOUT 180 -#ifdef LDAP_UFN - /* enable ufn support */ -#define GO500GW_UFN -#endif - /* attribute to use when sorting results */ -#define GO500GW_SORT_ATTR SORT_ATTR - /* - * only set and uncomment this if your hostname() does not return - * a fully qualified hostname - */ -/* #define GO500GW_HOSTNAME "fully.qualified.hostname.here" */ - /* number of DN components to show in entry displays */ -#define GO500GW_RDNCOUNT DEFAULT_RDNCOUNT - -/* - * RCPT500 MAIL RESPONDER GATEWAY DEFINITIONS - */ - /* where the helpfile lives */ -#define RCPT500_HELPFILE LDAP_DATADIR LDAP_DIRSEP "rcpt500.help" - /* maximum number of matches returned */ -#define RCPT500_SIZELIMIT 50 - /* address replies will appear to come from */ -#define RCPT500_FROM "\"Directory Query Program\" " - /* command that will accept an RFC822 message text on standard - input, and send it. sendmail -t does this nicely. */ -#define RCPT500_PIPEMAILCMD LDAP_SENDMAIL " -t" - /* attribute to use when sorting results */ -#define RCPT500_SORT_ATTR SORT_ATTR - /* max number of hits displayed in full before a list is presented */ -#define RCPT500_LISTLIMIT 1 -#ifdef LDAP_UFN - /* enable ufn support */ -#define RCPT500_UFN -#endif - /* number of DN components to show in entry displays */ -#define RCPT500_RDNCOUNT DEFAULT_RDNCOUNT - /* * MAIL500 MAILER DEFINITIONS */ @@ -182,24 +111,6 @@ Please try again later.\r\n" /* default base below which all groups live */ #define UD_WHERE_ALL_GROUPS_LIVE "" -/* - * FAX500 DEFINITIONS - */ - /* how long to wait for searches */ -#define FAX_TIMEOUT 180 - /* maximum number of ambiguous matches reported */ -#define FAX_MAXAMBIGUOUS 10 - /* maximum number of members allowed */ -#define FAX_MAXMEMBERS LDAP_NO_LIMIT - /* program to send mail */ -#define FAX_SENDMAIL LDAP_SENDMAIL - -/* - * RP500 DEFINITIONS - */ - /* prefix to add to non-fully-qualified numbers */ -#define RP_PHONEPREFIX "" - /* * SLAPD DEFINITIONS */ @@ -220,9 +131,5 @@ Please try again later.\r\n" #define SLAPD_SCHEMA_DN "cn=Subschema" /* dn of the default "monitor" subentry */ #define SLAPD_MONITOR_DN "cn=Monitor" -#if 0 - /* dn of the default "config" subentry */ -#define SLAPD_CONFIG_DN "cn=Config" -#endif #endif /* _LDAP_CONFIG_H */ diff --git a/servers/slapd/Makefile.in b/servers/slapd/Makefile.in index 985bff3209..d1c77c6219 100644 --- a/servers/slapd/Makefile.in +++ b/servers/slapd/Makefile.in @@ -17,7 +17,7 @@ SRCS = main.c daemon.c connection.c search.c filter.c add.c charray.c \ repl.c lock.c controls.c extended.c kerberos.c passwd.c \ schema.c schema_check.c schema_init.c schema_prep.c \ schemaparse.c ad.c at.c mr.c syntax.c oc.c saslauthz.c \ - configinfo.c starttls.c index.c sets.c referral.c \ + starttls.c index.c sets.c referral.c \ root_dse.c sasl.c module.c suffixalias.c mra.c mods.c \ limits.c backglue.c operational.c \ $(@PLAT@_SRCS) @@ -30,7 +30,7 @@ OBJS = main.o daemon.o connection.o search.o filter.o add.o charray.o \ repl.o lock.o controls.o extended.o kerberos.o passwd.o \ schema.o schema_check.o schema_init.o schema_prep.o \ schemaparse.o ad.o at.o mr.o syntax.o oc.o saslauthz.o \ - configinfo.o starttls.o index.o sets.o referral.o \ + starttls.o index.o sets.o referral.o \ root_dse.o sasl.o module.o suffixalias.o mra.o mods.o \ limits.o backglue.o operational.o \ $(@PLAT@_OBJS) diff --git a/servers/slapd/configinfo.c b/servers/slapd/configinfo.c deleted file mode 100644 index f40f0af470..0000000000 --- a/servers/slapd/configinfo.c +++ /dev/null @@ -1,100 +0,0 @@ -/* $OpenLDAP$ */ -/* - * Copyright 1998-2000 The OpenLDAP Foundation, All Rights Reserved. - * COPYING RESTRICTIONS APPLY, see COPYRIGHT file - */ -/* - * Copyright (c) 1995 Regents of the University of Michigan. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that this notice is preserved and that due credit is given - * to the University of Michigan at Ann Arbor. The name of the University - * may not be used to endorse or promote products derived from this - * software without specific prior written permission. This software - * is provided ``as is'' without express or implied warranty. - */ - -#include "portable.h" - -#include - -#include -#include - -#include "slap.h" - -#if defined( SLAPD_CONFIG_DN ) - -/* - * no mutex protection in here - take our chances! - */ - -int -config_info( - Entry **entry, const char **text ) -{ - Entry *e; - char buf[BUFSIZ]; - struct berval val, *ndn = NULL; - struct berval *vals[2]; - int i, j; - - vals[0] = &val; - vals[1] = NULL; - - e = (Entry *) ch_calloc( 1, sizeof(Entry) ); - e->e_private = NULL; - e->e_attrs = NULL; - - e->e_name.bv_val = SLAPD_CONFIG_DN; - e->e_name.bv_len = sizeof( SLAPD_CONFIG_DN ) - 1; - - - e->e_attrs = NULL; - ber_str2bv( SLAPD_CONFIG_DN, sizeof(SLAPD_CONFIG_DN)-1, 1, &e->e_name ); - (void) dnNormalize( NULL, &e->e_name, &ndn ); - e->e_nname = *ndn; - free( ndn ); - e->e_private = NULL; - - val.bv_val = "top"; - val.bv_len = sizeof("top")-1; - attr_merge( e, "objectClass", vals ); - - val.bv_val = "LDAPsubentry"; - val.bv_len = sizeof("LDAPsubentry")-1; - attr_merge( e, "objectClass", vals ); - - val.bv_val = "extensibleObject"; - val.bv_len = sizeof("extensibleObject")-1; - attr_merge( e, "objectClass", vals ); - - { - val.bv_val = strchr( e->e_dn, '=' ); - - if( val.bv_val != NULL ) { - *val.bv_val++ = '\0'; - val.bv_len = e->e_name.bv_len - (val.bv_val-e->e_dn); - - attr_merge( e, rdn, vals ); - val.bv_val[-1] = '='; - } - } - - for ( i = 0; i < nbackends; i++ ) { - char *ptr = slap_strcopy( buf, backends[i].be_type ); - for ( j = 0; backends[i].be_suffix[j] != NULL; j++ ) { - ptr = slap_strcopy( ptr, " : " ); - ptr = slap_strcopy( ptr, backends[i].be_suffix[j]->bv_val ); - } - val.bv_val = buf; - val.bv_len = ptr - buf; - attr_merge( e, "database", vals ); - } - - *entry = e; - return LDAP_SUCCESS; -} - -#endif /* slapd_config_dn */ -- 2.39.5