From 21e081dc5b4e9f115302c4d3ab231b2caf1ad2c5 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Thu, 17 Jun 1999 03:54:25 +0000 Subject: [PATCH] Separate autoconf generated values from "defaults". ldap_defaults.h incorporates non-generated ldapconfig.h values. ldap_config.h.in is new template for autoconf generated defaults (namely directories and paths) ldap_config.h.nt, NT template (must be manually copied) s/// s/DIRSEP/LDAP_DIRSEP/ & s/DEFAULT_/LDAP_/ --- clients/fax500/main.c | 2 +- clients/fax500/rp500.c | 2 +- clients/finger/main.c | 2 +- clients/gopher/go500.c | 2 +- clients/gopher/go500gw.c | 2 +- clients/mail500/main.c | 2 +- clients/rcpt500/help.c | 2 +- clients/rcpt500/main.c | 2 +- clients/rcpt500/query.c | 2 +- clients/tools/ldapmodify.c | 4 +- clients/tools/ldappasswd.c | 4 +- clients/ud/auth.c | 2 +- clients/ud/edit.c | 2 +- clients/ud/group.c | 2 +- clients/ud/main.c | 2 +- clients/ud/util.c | 2 +- include/Makefile.in | 21 +- include/ldap_config.h.in | 55 +++++ include/ldap_config.h.nt | 58 +++++ .../{ldapconfig.h.edit => ldap_defaults.h} | 57 ++--- include/ldapconfig.h.nt | 228 ------------------ include/portable.h.nt | 1 - libraries/libldap/init.c | 12 +- libraries/libldap/tmplout.c | 2 +- libraries/libldap/ufn.c | 2 +- libraries/liblutil/getpass.c | 2 +- libraries/liblutil/ntservice.c | 2 +- servers/slapd/attr.c | 2 +- servers/slapd/back-bdb2/dbcache.c | 2 +- servers/slapd/back-bdb2/idl.c | 2 +- servers/slapd/back-bdb2/startup.c | 13 +- servers/slapd/back-bdb2/txn.c | 17 +- servers/slapd/back-bdb2/txn.h | 2 +- servers/slapd/back-ldbm/dbcache.c | 5 +- servers/slapd/back-ldbm/idl.c | 2 +- servers/slapd/back-ldbm/startup.c | 2 +- servers/slapd/config.c | 2 +- servers/slapd/configinfo.c | 2 +- servers/slapd/daemon.c | 2 +- servers/slapd/main.c | 2 +- servers/slapd/monitor.c | 2 +- servers/slapd/nt_debug.c | 2 +- servers/slapd/nt_svc.c | 4 +- servers/slapd/root_dse.c | 2 +- servers/slapd/schema.c | 2 +- servers/slapd/search.c | 2 +- servers/slapd/tools/ldbmtest.c | 4 +- servers/slapd/tools/ldif2id2children-bdb2.c | 2 +- servers/slapd/tools/ldif2id2children.c | 2 +- servers/slapd/tools/ldif2id2entry-bdb2.c | 2 +- servers/slapd/tools/ldif2id2entry.c | 2 +- servers/slapd/tools/ldif2index-bdb2.c | 2 +- servers/slapd/tools/ldif2index.c | 2 +- servers/slapd/tools/ldif2ldbm-bdb2.c | 4 +- servers/slapd/tools/ldif2ldbm.c | 4 +- servers/slurpd/slurp.h | 2 +- tests/progs/slapd-tester.c | 10 +- 57 files changed, 227 insertions(+), 354 deletions(-) create mode 100644 include/ldap_config.h.in create mode 100644 include/ldap_config.h.nt rename include/{ldapconfig.h.edit => ldap_defaults.h} (83%) delete mode 100644 include/ldapconfig.h.nt diff --git a/clients/fax500/main.c b/clients/fax500/main.c index 654a3df0a6..614fe416d3 100644 --- a/clients/fax500/main.c +++ b/clients/fax500/main.c @@ -39,7 +39,7 @@ #include "fax500.h" -#include +#include #define USER 0 #define GROUP_ERRORS 1 diff --git a/clients/fax500/rp500.c b/clients/fax500/rp500.c index 2df90c6ba3..3b93ea5943 100644 --- a/clients/fax500/rp500.c +++ b/clients/fax500/rp500.c @@ -34,7 +34,7 @@ #include "fax500.h" -#include +#include #define DEFAULT_PORT 79 #define DEFAULT_SIZELIMIT 50 diff --git a/clients/finger/main.c b/clients/finger/main.c index 9b1cf975f9..352c2ccd79 100644 --- a/clients/finger/main.c +++ b/clients/finger/main.c @@ -34,7 +34,7 @@ #include "disptmpl.h" -#include "ldapconfig.h" +#include "ldap_defaults.h" int dosyslog = 1; diff --git a/clients/gopher/go500.c b/clients/gopher/go500.c index d9a0d64447..b8d148818f 100644 --- a/clients/gopher/go500.c +++ b/clients/gopher/go500.c @@ -35,7 +35,7 @@ #include #endif -#include "ldapconfig.h" +#include "ldap_defaults.h" #include "lber.h" #include "ldap.h" diff --git a/clients/gopher/go500gw.c b/clients/gopher/go500gw.c index 843e7d25a2..72825929a9 100644 --- a/clients/gopher/go500gw.c +++ b/clients/gopher/go500gw.c @@ -46,7 +46,7 @@ #include "disptmpl.h" -#include "ldapconfig.h" +#include "ldap_defaults.h" int debug; int ldap_syslog; diff --git a/clients/mail500/main.c b/clients/mail500/main.c index 7719d959e8..d322aa205d 100644 --- a/clients/mail500/main.c +++ b/clients/mail500/main.c @@ -38,7 +38,7 @@ #include "lber.h" #include "ldap.h" -#include "ldapconfig.h" +#include "ldap_defaults.h" #ifndef MAIL500_BOUNCEFROM #define MAIL500_BOUNCEFROM "<>" diff --git a/clients/rcpt500/help.c b/clients/rcpt500/help.c index 9485f7dd9f..31efcb1635 100644 --- a/clients/rcpt500/help.c +++ b/clients/rcpt500/help.c @@ -18,7 +18,7 @@ #include #endif -#include "ldapconfig.h" +#include "ldap_defaults.h" #include "rcpt500.h" diff --git a/clients/rcpt500/main.c b/clients/rcpt500/main.c index 4cfcd66a79..9a37edae75 100644 --- a/clients/rcpt500/main.c +++ b/clients/rcpt500/main.c @@ -18,7 +18,7 @@ #include #include -#include "ldapconfig.h" +#include "ldap_defaults.h" #include "rcpt500.h" int dosyslog = 0; diff --git a/clients/rcpt500/query.c b/clients/rcpt500/query.c index c83a02bdab..6094e155c0 100644 --- a/clients/rcpt500/query.c +++ b/clients/rcpt500/query.c @@ -23,7 +23,7 @@ #include "disptmpl.h" #include "rcpt500.h" -#include "ldapconfig.h" +#include "ldap_defaults.h" static char buf[ MAXSIZE ]; static char *errpreface = "Your query failed: "; diff --git a/clients/tools/ldapmodify.c b/clients/tools/ldapmodify.c index e9e37cb8bc..1a01a1a8da 100644 --- a/clients/tools/ldapmodify.c +++ b/clients/tools/ldapmodify.c @@ -28,7 +28,7 @@ #include #include -#include +#include static char *prog; static char *binddn = NULL; @@ -99,7 +99,7 @@ main( int argc, char **argv ) FILE *fp; int rc, i, use_ldif, authmethod, version, want_bindpw, debug; - if (( prog = strrchr( argv[ 0 ], *DIRSEP )) == NULL ) { + if (( prog = strrchr( argv[ 0 ], *LDAP_DIRSEP )) == NULL ) { prog = argv[ 0 ]; } else { ++prog; diff --git a/clients/tools/ldappasswd.c b/clients/tools/ldappasswd.c index 83507119df..a2e31ea067 100644 --- a/clients/tools/ldappasswd.c +++ b/clients/tools/ldappasswd.c @@ -32,13 +32,13 @@ #include #include -#include "ldapconfig.h" +#include "ldap_defaults.h" /* local macros */ #define CEILING(x) ((double)(x) > (int)(x) ? (int)(x) + 1 : (int)(x)) #define LDAP_PASSWD_ATTRIB "userPassword" -#define LDAP_PASSWD_CONF DEFAULT_SYSCONFDIR DIRSEP "passwd.conf" +#define LDAP_PASSWD_CONF LDAP_SYSCONFDIR LDAP_DIRSEP "passwd.conf" #define HS_NONE 0 #define HS_PLAIN 1 diff --git a/clients/ud/auth.c b/clients/ud/auth.c index e72e9c7443..e3968a04ef 100644 --- a/clients/ud/auth.c +++ b/clients/ud/auth.c @@ -28,7 +28,7 @@ #include #include -#include +#include #include "ud.h" diff --git a/clients/ud/edit.c b/clients/ud/edit.c index 6ff9a1677d..3cc1530d9b 100644 --- a/clients/ud/edit.c +++ b/clients/ud/edit.c @@ -32,7 +32,7 @@ #include #include -#include +#include #include "ud.h" static int load_editor( void ); diff --git a/clients/ud/group.c b/clients/ud/group.c index 54a79a96db..e8ef8b48fd 100644 --- a/clients/ud/group.c +++ b/clients/ud/group.c @@ -26,7 +26,7 @@ #include #include -#include +#include #include "ud.h" static char * bind_and_fetch(char *name); diff --git a/clients/ud/main.c b/clients/ud/main.c index a4d742bbee..81e377d898 100644 --- a/clients/ud/main.c +++ b/clients/ud/main.c @@ -46,7 +46,7 @@ #include #include -#include +#include #include "ud.h" /* diff --git a/clients/ud/util.c b/clients/ud/util.c index 1d0db263fa..70a6c54ee9 100644 --- a/clients/ud/util.c +++ b/clients/ud/util.c @@ -26,7 +26,7 @@ #include #include -#include +#include #include "ud.h" diff --git a/include/Makefile.in b/include/Makefile.in index 9d02a3acbd..4eeb82ab46 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -3,7 +3,7 @@ ## ## include Makefile.in for OpenLDAP -all-local: ldapconfig.h FORCE +all-local: ldap_config.h FORCE install-local: FORCE -$(MKDIR) -p $(includedir) @@ -16,22 +16,19 @@ install-local: FORCE $(INSTALL) $(INSTALLFLAGS) -m 644 ldap_features.h $(includedir) clean-local: FORCE - $(RM) ldapconfig.h + $(RM) ldap_config.h veryclean-local: clean-local FORCE $(RM) portable.h ldap_features.h -depend-local: ldapconfig.h FORCE +depend-local: ldap_config.h FORCE -ldapconfig.h: $(srcdir)/ldapconfig.h.edit Makefile +LDAP_CONFIG=$(srcdir)/ldap_config.h.in + +ldap_config.h: $(LDAP_CONFIG) Makefile @$(RM) $@ - @echo "Making ldapconfig.h" - @echo "/*" > $@; \ - echo " * This file was automatically generated. Do not edit it." >> $@; \ - echo " * Instead, edit the file ldapconfig.h.edit. See the LDAP" >> $@; \ - echo " * INSTALL file for more information." >> $@; \ - echo " */ " >> $@; \ - echo "" >> $@; \ + @echo "Making $@" + @echo "/* Generated from $(LDAP_CONFIG) on `date` */" > $@; \ $(SED) \ -e 's;%SYSCONFDIR%;$(sysconfdir);' \ -e 's;%DATADIR%;$(datadir);' \ @@ -42,7 +39,7 @@ ldapconfig.h: $(srcdir)/ldapconfig.h.edit Makefile -e 's;%EDITOR%;$(EDITOR);' \ -e 's;%FINGER%;$(FINGER);' \ -e 's;%SENDMAIL%;$(SENDMAIL);' \ - $(srcdir)/ldapconfig.h.edit >> $@; \ + $(LDAP_CONFIG) >> $@; \ $(CHMOD) 444 $@ all-common: all-local diff --git a/include/ldap_config.h.in b/include/ldap_config.h.in new file mode 100644 index 0000000000..a26b394f06 --- /dev/null +++ b/include/ldap_config.h.in @@ -0,0 +1,55 @@ +/* + * Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA + * All rights reserved. + * + * Redistribution and use in source and binary forms are permitted only + * as authorized by the OpenLDAP Public License. A copy of this + * license is available at http://www.OpenLDAP.org/license.html or + * in file LICENSE in the top-level directory of the distribution. + */ + +/* + * This file works in confunction with OpenLDAP configure system. + * If you do no like the values below, adjust your configure options. + */ + +#ifndef _LDAP_CONFIG_H +#define _LDAP_CONFIG_H + +/* directory separator */ +#ifndef LDAP_DIRSEP +#define LDAP_DIRSEP "/" +#endif + +/* directories */ +#ifndef LDAP_BINDIR +#define LDAP_BINDIR "%BINDIR%" +#endif +#ifndef LDAP_SBINDIR +#define LDAP_SBINDIR "%SBINDIR%" +#endif +#ifndef LDAP_DATADIR +#define LDAP_DATADIR "%DATADIR%" +#endif +#ifndef LDAP_SYSCONFDIR +#define LDAP_SYSCONFDIR "%SYSCONFDIR%" +#endif +#ifndef LDAP_LIBEXECDIR +#define LDAP_LIBEXECDIR "%LIBEXECDIR%" +#endif +#ifndef LDAP_RUNDIR +#define LDAP_RUNDIR "%RUNDIR%" +#endif + +/* command locations */ +#ifndef LDAP_EDITOR +#define LDAP_EDITOR "%EDITOR%" +#endif +#ifndef LDAP_FINGER +#define LDAP_FINGER "%FINGER%" +#endif +#ifndef LDAP_SENDMAIL +#define LDAP_SENDMAIL "%SENDMAIL%" +#endif + +#endif /* _LDAP_CONFIG_H */ diff --git a/include/ldap_config.h.nt b/include/ldap_config.h.nt new file mode 100644 index 0000000000..3e6f4bbb0c --- /dev/null +++ b/include/ldap_config.h.nt @@ -0,0 +1,58 @@ +/* + * Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA + * All rights reserved. + * + * Redistribution and use in source and binary forms are permitted only + * as authorized by the OpenLDAP Public License. A copy of this + * license is available at http://www.OpenLDAP.org/license.html or + * in file LICENSE in the top-level directory of the distribution. + */ + +/* + * This file works in confunction with OpenLDAP configure system. + * If you do no like the values below, adjust your configure options. + */ + +#ifndef _LDAP_CONFIG_H +#define _LDAP_CONFIG_H + +/* directory separator */ +#ifndef LDAP_DIRSEP +#define LDAP_DIRSEP "\\" +#endif + +/* directories */ +#ifndef LDAP_PREFIX +#define LDAP_PREFIX "C:\\OpenLDAP" +#endif +#ifndef LDAP_BINDIR +#define LDAP_BINDIR LDAP_PREFIX "\\bin" +#endif +#ifndef LDAP_SBINDIR +#define LDAP_SBINDIR LDAP_PREFIX "\\sbin" +#endif +#ifndef LDAP_DATADIR +#define LDAP_DATADIR LDAP_PREFIX "\\share" +#endif +#ifndef LDAP_SYSCONFDIR +#define LDAP_SYSCONFDIR LDAP_PREFIX "\\sysconf" +#endif +#ifndef LDAP_LIBEXECDIR +#define LDAP_LIBEXECDIR LDAP_PREFIX "\\libexec" +#endif +#ifndef LDAP_RUNDIR +#define LDAP_RUNDIR LDAP_PREFIX "\\run" +#endif + +/* command locations */ +#ifndef LDAP_EDITOR +#define LDAP_EDITOR "%EDITOR%" +#endif +#ifndef LDAP_FINGER +#define LDAP_FINGER "%FINGER%" +#endif +#ifndef LDAP_SENDMAIL +#define LDAP_SENDMAIL "%SENDMAIL%" +#endif + +#endif /* _LDAP_CONFIG_H */ diff --git a/include/ldapconfig.h.edit b/include/ldap_defaults.h similarity index 83% rename from include/ldapconfig.h.edit rename to include/ldap_defaults.h index f26e40ae61..1f26c30a2c 100644 --- a/include/ldapconfig.h.edit +++ b/include/ldap_defaults.h @@ -19,33 +19,20 @@ * is provided ``as is'' without express or implied warranty. */ -#ifndef _LDAP_CONFIG_H -#define _LDAP_CONFIG_H - /* - * config.h for LDAP -- edit this file to customize OpenLDAP behavior. - * NO platform-specific definitions should be placed in this file. + * This file controls defaults for OpenLDAP package. + * You should not change any of these settings. */ -/* - * SHARED DEFINITIONS - * These are shared with Makefile and should not change via configure - */ -#ifndef DIRSEP -#define DIRSEP "/" -#endif -#define DEFAULT_BINDIR "%BINDIR%" -#define DEFAULT_SBINDIR "%SBINDIR%" -#define DEFAULT_DATADIR "%DATADIR%" -#define DEFAULT_SYSCONFDIR "%SYSCONFDIR%" -#define DEFAULT_LIBEXECDIR "%LIBEXECDIR%" -#define DEFAULT_RUNDIR "%RUNDIR%" +#ifndef _LDAP_DEFAULTS_H +#define _LDAP_DEFAULTS_H + -#define DEFAULT_EDITOR "%EDITOR%" +#include -#define DEFAULT_LDAP_CONF_FILE "%SYSCONFDIR%/ldap.conf" -#define DEFAULT_LDAP_USERRC_FILE "ldaprc" -#define DEFAULT_LDAP_ENV_PREFIX "LDAP" +#define LDAP_CONF_FILE LDAP_SYSCONFDIR LDAP_DIRSEP "ldap.conf" +#define LDAP_USERRC_FILE "ldaprc" +#define LDAP_ENV_PREFIX "LDAP" /********************************************************************* @@ -62,10 +49,10 @@ /* default count of DN components to show in entry displays */ #define DEFAULT_RDNCOUNT 2 /* default config file locations */ -#define FILTERFILE "%SYSCONFDIR%/ldapfilter.conf" -#define TEMPLATEFILE "%SYSCONFDIR%/ldaptemplates.conf" -#define SEARCHFILE "%SYSCONFDIR%/ldapsearchprefs.conf" -#define FRIENDLYFILE "%DATADIR%/ldapfriendly" +#define FILTERFILE LDAP_SYSCONFDIR LDAP_DIRSEP "ldapfilter.conf" +#define TEMPLATEFILE LDAP_SYSCONFDIR LDAP_DIRSEP "ldaptemplates.conf" +#define SEARCHFILE LDAP_SYSCONFDIR LDAP_DIRSEP "ldapsearchprefs.conf" +#define FRIENDLYFILE LDAP_DATADIR LDAP_DIRSEP "ldapfriendly" /* * FINGER DEFINITIONS @@ -89,7 +76,7 @@ Please try again later.\r\n" /* max number of hits displayed in full before a list is presented */ #define FINGER_LISTLIMIT 1 /* what to exec for "finger @host" */ -#define FINGER_CMD "%FINGER%" +#define FINGER_CMD LDAP_FINGER /* how to treat aliases when searching */ #define FINGER_DEREF LDAP_DEREF_FINDING /* attribute to use when sorting results */ @@ -126,7 +113,7 @@ Please try again later.\r\n" * GO500GW GOPHER GATEWAY DEFINITIONS */ /* where the helpfile lives */ -#define GO500GW_HELPFILE "%DATADIR%/go500gw.help" +#define GO500GW_HELPFILE LDAP_DATADIR LDAP_DIRSEP "go500gw.help" /* port on which to listen */ #define GO500GW_PORT 7777 /* timeout on all searches */ @@ -147,14 +134,14 @@ Please try again later.\r\n" * RCPT500 MAIL RESPONDER GATEWAY DEFINITIONS */ /* where the helpfile lives */ -#define RCPT500_HELPFILE "%DATADIR%/rcpt500.help" +#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 "%SENDMAIL% -t" +#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 */ @@ -174,15 +161,15 @@ Please try again later.\r\n" /* timeout for all searches */ #define MAIL500_TIMEOUT 180 /* sendmail location - mail500 needs to exec this */ -#define MAIL500_SENDMAIL "%SENDMAIL%" +#define MAIL500_SENDMAIL LDAP_SENDMAIL /* * UD DEFINITIONS */ /* ud configuration file */ -#define UD_CONFIG_FILE "%SYSCONFDIR%/ud.conf" +#define UD_CONFIG_FILE LDAP_SYSCONFDIR LDAP_DIRSEP "ud.conf" /* default editor */ -#define UD_DEFAULT_EDITOR DEFAULT_EDITOR +#define UD_DEFAULT_EDITOR LDAP_EDITOR /* default bbasename of user config file */ #define UD_USER_CONFIG_FILE ".udrc" /* default base where groups are created */ @@ -200,7 +187,7 @@ Please try again later.\r\n" /* maximum number of members allowed */ #define FAX_MAXMEMBERS LDAP_NO_LIMIT /* program to send mail */ -#define FAX_SENDMAIL "%SENDMAIL%" +#define FAX_SENDMAIL LDAP_SENDMAIL /* * RP500 DEFINITIONS @@ -212,7 +199,7 @@ Please try again later.\r\n" * SLAPD DEFINITIONS */ /* location of the default slapd config file */ -#define SLAPD_DEFAULT_CONFIGFILE "%SYSCONFDIR%/slapd.conf" +#define SLAPD_DEFAULT_CONFIGFILE LDAP_SYSCONFDIR LDAP_DIRSEP "slapd.conf" /* default max deref depth for aliases */ #define SLAPD_DEFAULT_MAXDEREFDEPTH 15 /* default sizelimit on number of entries from a search */ diff --git a/include/ldapconfig.h.nt b/include/ldapconfig.h.nt deleted file mode 100644 index 5b21bea2b0..0000000000 --- a/include/ldapconfig.h.nt +++ /dev/null @@ -1,228 +0,0 @@ -/* - * Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted only - * as authorized by the OpenLDAP Public License. A copy of this - * license is available at http://www.OpenLDAP.org/license.html or - * in file LICENSE in the top-level directory of the distribution. - */ -/* Portions - * Copyright (c) 1994 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. - */ - -#ifndef _LDAP_CONFIG_H -#define _LDAP_CONFIG_H - -/* - * config.h for LDAP -- edit this file to customize LDAP client behavior. - * NO platform-specific definitions should be placed in this file. - * Note that this IS USED by the LDAP or LBER libraries. - */ - -/* - * SHARED DEFINITIONS - things you should change - */ -#define DEFAULT_BINDIR "C:\\OpenLDAP\\bin" -#define DEFAULT_SBINDIR "C:\\OpenLDAP\\sbin" -#define DEFAULT_DATADIR "C:\\OpenLDAP\\share" -#define DEFAULT_SYSCONFDIR "C:\\OpenLDAP\\etc" -#define DEFAULT_LIBEXECDIR "C:\\OpenLDAP\\execdir" -#define DEFAULT_RUNDIR "C:\\OpenLDAP\\run" - -#define DEFAULT_LDAP_CONF_FILE "C:\\OpenLDAP\\ldap.conf" -#define DEFAULT_LDAP_USERRC_FILE "ldaprc" -#define DEFAULT_LDAP_ENV_PREFIX "LDAP" - - -/********************************************************************* - * * - * You probably do not need to edit anything below this point * - * * - *********************************************************************/ - -/* - * SHARED DEFINITIONS - other things you can change - */ - /* default attribute to use when sorting entries, NULL => sort by DN */ -#define SORT_ATTR NULL - /* default count of DN components to show in entry displays */ -#define DEFAULT_RDNCOUNT 2 - /* default config file locations */ -#define FILTERFILE "C:\\OpenLDAP\\etc\\ldapfilter.conf" -#define TEMPLATEFILE "C:\\OpenLDAP\\etc\\ldaptemplates.conf" -#define SEARCHFILE "C:\\OpenLDAP\\etc\\ldapsearchprefs.conf" -#define FRIENDLYFILE "C:\\OpenLDAP\\share\\ldapfriendly" - -/* - * FINGER DEFINITIONS - */ - /* banner to print */ -#define FINGER_BANNER "OpenLDAP Finger Service...\r\n" - /* who to report errors to */ -#define FINGER_ERRORS "System Administrator" - /* what to say if no matches are found */ -#define FINGER_NOMATCH "Search failed to find anything.\r\n" - /* what to say if the service may be unavailable */ -#define FINGER_UNAVAILABLE \ -"The directory service may be temporarily unavailable.\r\n\ -Please try again later.\r\n" - /* printed if a match has no email address - for disptmp default */ -#define FINGER_NOEMAIL1 "None registered in this service." -#define FINGER_NOEMAIL2 NULL -#define FINGER_NOEMAIL { FINGER_NOEMAIL1, FINGER_NOEMAIL2, NULL } - /* maximum number of matches returned */ -#define FINGER_SIZELIMIT 50 - /* max number of hits displayed in full before a list is presented */ -#define FINGER_LISTLIMIT 1 - /* what to exec for "finger @host" */ -#define FINGER_CMD "%FINGER%" - /* how to treat aliases when searching */ -#define FINGER_DEREF LDAP_DEREF_FINDING - /* attribute to use when sorting results */ -#define FINGER_SORT_ATTR SORT_ATTR - /* enable ufn support */ -#define FINGER_UFN - /* timeout for searches */ -#define FINGER_TIMEOUT 60 - /* 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 - /* enable ufn support */ -#define GO500_UFN - /* - * 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 "C:\\OpenLDAP\\share\\go500gw.help" - /* port on which to listen */ -#define GO500GW_PORT 7777 - /* timeout on all searches */ -#define GO500GW_TIMEOUT 180 - /* enable ufn support */ -#define GO500GW_UFN - /* 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 "C:\\OpenLDAP\\share\\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 "%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 - /* enable ufn support */ -#define RCPT500_UFN - /* number of DN components to show in entry displays */ -#define RCPT500_RDNCOUNT DEFAULT_RDNCOUNT - -/* - * MAIL500 MAILER DEFINITIONS - */ - /* max number of ambiguous matches reported */ -#define MAIL500_MAXAMBIGUOUS 10 - /* max subscribers allowed (size limit when searching for them ) */ -#define MAIL500_MAXGROUPMEMBERS LDAP_NO_LIMIT - /* timeout for all searches */ -#define MAIL500_TIMEOUT 180 - /* sendmail location - mail500 needs to exec this */ -#define MAIL500_SENDMAIL "%SENDMAIL%" - -/* - * UD DEFINITIONS - */ - /* ud configuration file */ -#define UD_CONFIG_FILE "C:\\OpenLDAP\\etc\\ud.conf" - /* default editor */ -#define UD_DEFAULT_EDITOR "%EDITOR%" - /* default bbasename of user config file */ -#define UD_USER_CONFIG_FILE ".udrc" - /* default base where groups are created */ -#define UD_WHERE_GROUPS_ARE_CREATED "" - /* 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 "%SENDMAIL%" - -/* - * RP500 DEFINITIONS - */ - /* prefix to add to non-fully-qualified numbers */ -#define RP_PHONEPREFIX "" - -/* - * SLAPD DEFINITIONS - */ - /* location of the default slapd config file */ -#define SLAPD_DEFAULT_CONFIGFILE "C:\\OpenLDAP\\etc\\slapd.conf" - /* default max deref depth for aliases */ -#define SLAPD_DEFAULT_MAXDEREFDEPTH 15 - /* default sizelimit on number of entries from a search */ -#define SLAPD_DEFAULT_SIZELIMIT 500 - /* default timelimit to spend on a search */ -#define SLAPD_DEFAULT_TIMELIMIT 3600 - /* extension of the slapd pid file */ -#define SLAPD_PIDEXT ".pid" - /* extension of the slapd args file */ -#define SLAPD_ARGSEXT ".args" - /* dn of the special "monitor" entry */ -#define SLAPD_MONITOR_DN "cn=monitor" - /* dn of the special "config" entry */ -#define SLAPD_CONFIG_DN "cn=config" - /* minimum max ids that a single index entry can map to in ldbm */ -#define SLAPD_LDBM_MIN_MAXIDS 4000 - -#endif /* _LDAP_CONFIG_H */ diff --git a/include/portable.h.nt b/include/portable.h.nt index 84ddc07a2a..beee37a789 100644 --- a/include/portable.h.nt +++ b/include/portable.h.nt @@ -21,7 +21,6 @@ #define OPENLDAP_PACKAGE "OpenLDAP" #define OPENLDAP_VERSION "-devel" #define EXEEXT ".exe" -#define DIRSEP "\\" #if defined( _DEBUG ) && !defined( LDAP_DEBUG ) /* #define LDAP_MEMORY_DEBUG 1 */ diff --git a/libraries/libldap/init.c b/libraries/libldap/init.c index 75bc7a5ec1..ec2ca20929 100644 --- a/libraries/libldap/init.c +++ b/libraries/libldap/init.c @@ -13,7 +13,7 @@ #include #include "ldap-int.h" -#include "ldapconfig.h" +#include "ldap_defaults.h" struct ldapoptions ldap_int_global_options = { LDAP_UNINITIALIZED, LDAP_DEBUG_NONE }; @@ -222,7 +222,7 @@ static void openldap_ldap_init_w_env(const char *prefix) char *value; if (prefix == NULL) { - prefix = DEFAULT_LDAP_ENV_PREFIX; + prefix = LDAP_ENV_PREFIX; } strncpy(buf, prefix, MAX_LDAP_ENV_PREFIX_LEN); @@ -313,11 +313,11 @@ void ldap_int_initialize( void ) return; } - openldap_ldap_init_w_conf(DEFAULT_LDAP_CONF_FILE); - openldap_ldap_init_w_userconf(DEFAULT_LDAP_USERRC_FILE); + openldap_ldap_init_w_conf(LDAP_CONF_FILE); + openldap_ldap_init_w_userconf(LDAP_USERRC_FILE); { - char *altfile = getenv("LDAPCONF"); + char *altfile = getenv(LDAP_ENV_PREFIX "CONF"); if( altfile != NULL ) { openldap_ldap_init_w_conf( altfile ); @@ -325,7 +325,7 @@ void ldap_int_initialize( void ) } { - char *altfile = getenv("LDAPRC"); + char *altfile = getenv(LDAP_ENV_PREFIX "RC"); if( altfile != NULL ) { openldap_ldap_init_w_userconf( altfile ); diff --git a/libraries/libldap/tmplout.c b/libraries/libldap/tmplout.c index 72b213947e..b3b16b194b 100644 --- a/libraries/libldap/tmplout.c +++ b/libraries/libldap/tmplout.c @@ -28,7 +28,7 @@ #include "disptmpl.h" #include "ldap-int.h" -#include "ldapconfig.h" +#include "ldap_defaults.h" #define writeptype ldap_writeptype diff --git a/libraries/libldap/ufn.c b/libraries/libldap/ufn.c index 45386a1d62..da95c7ba63 100644 --- a/libraries/libldap/ufn.c +++ b/libraries/libldap/ufn.c @@ -21,7 +21,7 @@ #include #include "ldap-int.h" -#include "ldapconfig.h" +#include "ldap_defaults.h" typedef int (*cancelptype) LDAP_P(( void *cancelparm )); diff --git a/libraries/liblutil/getpass.c b/libraries/liblutil/getpass.c index f922c671ea..865c7d1885 100644 --- a/libraries/liblutil/getpass.c +++ b/libraries/liblutil/getpass.c @@ -35,7 +35,7 @@ #include #include -#include +#include char * getpass( const char *prompt ) diff --git a/libraries/liblutil/ntservice.c b/libraries/liblutil/ntservice.c index 10459c7a79..53c6841106 100644 --- a/libraries/liblutil/ntservice.c +++ b/libraries/liblutil/ntservice.c @@ -9,7 +9,7 @@ #include #include -#include "ldapconfig.h" +#include "ldap_defaults.h" //#include "slap.h" #include "slapdmsg.h" diff --git a/servers/slapd/attr.c b/servers/slapd/attr.c index d81a0626be..3fcca89c7e 100644 --- a/servers/slapd/attr.c +++ b/servers/slapd/attr.c @@ -18,7 +18,7 @@ #include #endif -#include "ldapconfig.h" +#include "ldap_defaults.h" #include "slap.h" #ifdef LDAP_DEBUG diff --git a/servers/slapd/back-bdb2/dbcache.c b/servers/slapd/back-bdb2/dbcache.c index 1e303b3798..e220c91dad 100644 --- a/servers/slapd/back-bdb2/dbcache.c +++ b/servers/slapd/back-bdb2/dbcache.c @@ -15,7 +15,7 @@ #include #endif -#include "ldapconfig.h" +#include "ldap_defaults.h" #include "slap.h" #include "back-bdb2.h" diff --git a/servers/slapd/back-bdb2/idl.c b/servers/slapd/back-bdb2/idl.c index 18d05cca69..49521a318b 100644 --- a/servers/slapd/back-bdb2/idl.c +++ b/servers/slapd/back-bdb2/idl.c @@ -7,7 +7,7 @@ #include #include -#include "ldapconfig.h" +#include "ldap_defaults.h" #include "slap.h" #include "back-bdb2.h" diff --git a/servers/slapd/back-bdb2/startup.c b/servers/slapd/back-bdb2/startup.c index b1901bdd3f..a1f8bc69ce 100644 --- a/servers/slapd/back-bdb2/startup.c +++ b/servers/slapd/back-bdb2/startup.c @@ -12,7 +12,7 @@ #include #endif -#include "ldapconfig.h" +#include "ldap_defaults.h" #include "slap.h" #include "back-bdb2.h" @@ -45,11 +45,12 @@ bdb2i_back_startup_internal( DB_INIT_LOCK | DB_INIT_MPOOL ); /* make sure, dbhome is an absolute path */ - if ( *lty->lty_dbhome != *DIRSEP ) { + if ( *lty->lty_dbhome != *LDAP_DIRSEP ) { char cwd[MAXPATHLEN]; (void) getcwd( cwd, MAXPATHLEN ); - sprintf( cwd, "%s%s%s", cwd, DIRSEP, lty->lty_dbhome ); + sprintf( cwd, "%s" LDAP_DIRSEP "%s", + cwd, lty->lty_dbhome ); free( lty->lty_dbhome ); lty->lty_dbhome = ch_strdup( cwd ); @@ -159,11 +160,13 @@ bdb2i_back_db_startup_internal( /* if the data directory is not an absolute path, have it relative to the current working directory (which should not be configured !) */ - if ( *li->li_directory != *DIRSEP ) { + if ( *li->li_directory != *LDAP_DIRSEP ) { char cwd[MAXPATHLEN]; (void) getcwd( cwd, MAXPATHLEN ); - sprintf( cwd, "%s%s%s", cwd, DIRSEP, li->li_directory ); + sprintf( cwd, "%s" LDAP_DIRSEP "%s", + cwd, li->li_directory ); + free( li->li_directory ); li->li_directory = ch_strdup( cwd ); diff --git a/servers/slapd/back-bdb2/txn.c b/servers/slapd/back-bdb2/txn.c index 1782c8eac0..fc61efe97c 100644 --- a/servers/slapd/back-bdb2/txn.c +++ b/servers/slapd/back-bdb2/txn.c @@ -51,8 +51,9 @@ bdb2i_init_db_file_cache( struct ldbminfo *li, BDB2_TXN_FILES *fileinfo ) fileinfo->dbc_refcnt = 1; - sprintf( buf, "%s%s%s", li->li_directory, DIRSEP, - fileinfo->dbc_name ); + sprintf( buf, "%s" LDAP_DIRSEP "%s", + li->li_directory, fileinfo->dbc_name ); + if ( stat( buf, &st ) == 0 ) { fileinfo->dbc_blksize = st.st_blksize; } else { @@ -133,8 +134,8 @@ bdb2i_txn_attr_config( if ( open && strcasecmp( fileName, "objectclass" )) { /* re-use filename to get the complete path */ - sprintf( fileName, "%s%s%s", - li->li_directory, DIRSEP, p->dbc_name ); + sprintf( fileName, "%s" LDAP_DIRSEP "%s", + li->li_directory, p->dbc_name ); /* since we have an mpool, we should not define a cache size */ p->dbc_db = bdb2i_db_open( fileName, DB_TYPE, @@ -180,8 +181,8 @@ bdb2i_open_nextid( BackendDB *be ) DB_INFO dbinfo; char fileName[MAXPATHLEN]; - sprintf( fileName, "%s%s%s", - li->li_directory, DIRSEP, NEXTID_NAME ); + sprintf( fileName, "%s" LDAP_DIRSEP "%s", + li->li_directory, NEXTID_NAME ); /* try to open the file for read and write */ memset( &dbinfo, 0, sizeof( dbinfo )); @@ -224,8 +225,8 @@ bdb2i_txn_open_files( BackendDB *be ) for ( dbFile = head->dbFiles; dbFile; dbFile = dbFile->next ) { char fileName[MAXPATHLEN]; - sprintf( fileName, "%s%s%s", - li->li_directory, DIRSEP, dbFile->dbc_name ); + sprintf( fileName, "%s" LDAP_DIRSEP "%s", + li->li_directory, dbFile->dbc_name ); /* since we have an mpool, we should not define a cache size */ dbFile->dbc_db = bdb2i_db_open( fileName, DB_TYPE, diff --git a/servers/slapd/back-bdb2/txn.h b/servers/slapd/back-bdb2/txn.h index a074e35b2d..b8ebc3aa7b 100644 --- a/servers/slapd/back-bdb2/txn.h +++ b/servers/slapd/back-bdb2/txn.h @@ -16,7 +16,7 @@ #include #include -#include "ldapconfig.h" +#include "ldap_defaults.h" #include "slap.h" #include "back-bdb2.h" diff --git a/servers/slapd/back-ldbm/dbcache.c b/servers/slapd/back-ldbm/dbcache.c index b624ef55a3..c7b8047a52 100644 --- a/servers/slapd/back-ldbm/dbcache.c +++ b/servers/slapd/back-ldbm/dbcache.c @@ -15,7 +15,7 @@ #include #endif -#include "ldapconfig.h" +#include "ldap_defaults.h" #include "slap.h" #include "back-ldbm.h" @@ -35,7 +35,8 @@ ldbm_cache_open( struct stat st; #endif - sprintf( buf, "%s%s%s%s", li->li_directory, DIRSEP, name, suffix ); + sprintf( buf, "%s" LDAP_DIRSEP "%s%s", + li->li_directory, name, suffix ); Debug( LDAP_DEBUG_TRACE, "=> ldbm_cache_open( \"%s\", %d, %o )\n", buf, flags, li->li_mode ); diff --git a/servers/slapd/back-ldbm/idl.c b/servers/slapd/back-ldbm/idl.c index ebe90f06d5..e1df58e980 100644 --- a/servers/slapd/back-ldbm/idl.c +++ b/servers/slapd/back-ldbm/idl.c @@ -7,7 +7,7 @@ #include #include -#include "ldapconfig.h" +#include "ldap_defaults.h" #include "slap.h" #include "back-ldbm.h" diff --git a/servers/slapd/back-ldbm/startup.c b/servers/slapd/back-ldbm/startup.c index 972ea04725..6680ecc9bc 100644 --- a/servers/slapd/back-ldbm/startup.c +++ b/servers/slapd/back-ldbm/startup.c @@ -8,7 +8,7 @@ #include #include -#include "ldapconfig.h" +#include "ldap_defaults.h" #include "slap.h" #include "back-ldbm.h" diff --git a/servers/slapd/config.c b/servers/slapd/config.c index dce9792855..1fc3cf52ea 100644 --- a/servers/slapd/config.c +++ b/servers/slapd/config.c @@ -11,7 +11,7 @@ #include #include -#include "ldapconfig.h" +#include "ldap_defaults.h" #include "slap.h" #define MAXARGS 100 diff --git a/servers/slapd/configinfo.c b/servers/slapd/configinfo.c index ac27ab01b8..332826ceb0 100644 --- a/servers/slapd/configinfo.c +++ b/servers/slapd/configinfo.c @@ -17,7 +17,7 @@ #include #include -#include "ldapconfig.h" +#include "ldap_defaults.h" #include "slap.h" #if defined( SLAPD_CONFIG_DN ) diff --git a/servers/slapd/daemon.c b/servers/slapd/daemon.c index 932e36babf..fa7b970d1d 100644 --- a/servers/slapd/daemon.c +++ b/servers/slapd/daemon.c @@ -10,7 +10,7 @@ #include #include -#include "ldapconfig.h" +#include "ldap_defaults.h" #include "slap.h" #ifdef HAVE_TCPD diff --git a/servers/slapd/main.c b/servers/slapd/main.c index e1e85ac113..6a96d847c0 100644 --- a/servers/slapd/main.c +++ b/servers/slapd/main.c @@ -11,7 +11,7 @@ #include #include -#include "ldapconfig.h" +#include "ldap_defaults.h" #include "slap.h" #include "lutil.h" /* Get lutil_detach() */ diff --git a/servers/slapd/monitor.c b/servers/slapd/monitor.c index 893e9c0814..c1ee2a993c 100644 --- a/servers/slapd/monitor.c +++ b/servers/slapd/monitor.c @@ -18,7 +18,7 @@ #include #include -#include "ldapconfig.h" +#include "ldap_defaults.h" #include "slap.h" #if defined( SLAPD_MONITOR_DN ) diff --git a/servers/slapd/nt_debug.c b/servers/slapd/nt_debug.c index 8bbd5009e3..4c1a916ec5 100644 --- a/servers/slapd/nt_debug.c +++ b/servers/slapd/nt_debug.c @@ -20,7 +20,7 @@ void (Debug)( int level, const char *fmt, ... ) if( log_file == NULL ) { - log_file = fopen( "C:\\OpenLDAP\\run\\slapd.log", "w" ); + log_file = fopen( LDAP_RUNDIR LDAP_DIRSEP "slapd.log", "w" ); if ( log_file == NULL ) log_file = fopen( "slapd.log", "w" ); diff --git a/servers/slapd/nt_svc.c b/servers/slapd/nt_svc.c index 6e1e869879..a63b58f65b 100644 --- a/servers/slapd/nt_svc.c +++ b/servers/slapd/nt_svc.c @@ -11,7 +11,7 @@ //#include //#include -#include "ldapconfig.h" +#include "ldap_defaults.h" #include "slap.h" #include "slapdmsg.h" @@ -53,7 +53,7 @@ void main( DWORD argc, LPTSTR *argv ) // set the service's current directory to being the installation directory for the service. // this way we don't have to write absolute paths in the configuration files GetModuleFileName( NULL, filename, sizeof( filename ) ); - fname_start = strrchr( filename, '\\' ); + fname_start = strrchr( filename, *LDAP_DIRSEP ); *fname_start = '\0'; SetCurrentDirectory( filename ); diff --git a/servers/slapd/root_dse.c b/servers/slapd/root_dse.c index 8264c52cd6..257bd37015 100644 --- a/servers/slapd/root_dse.c +++ b/servers/slapd/root_dse.c @@ -13,7 +13,7 @@ #include -#include "ldapconfig.h" +#include "ldap_defaults.h" #include "slap.h" void diff --git a/servers/slapd/schema.c b/servers/slapd/schema.c index 6170afdc97..4fa5dbfaff 100644 --- a/servers/slapd/schema.c +++ b/servers/slapd/schema.c @@ -7,7 +7,7 @@ #include #include -#include "ldapconfig.h" +#include "ldap_defaults.h" #include "slap.h" static char * oc_check_required(Entry *e, char *ocname); diff --git a/servers/slapd/search.c b/servers/slapd/search.c index bb0ee0f6b2..a6772d6757 100644 --- a/servers/slapd/search.c +++ b/servers/slapd/search.c @@ -17,7 +17,7 @@ #include #include -#include "ldapconfig.h" +#include "ldap_defaults.h" #include "slap.h" diff --git a/servers/slapd/tools/ldbmtest.c b/servers/slapd/tools/ldbmtest.c index 0e7cf5e64c..dcf169f5a4 100644 --- a/servers/slapd/tools/ldbmtest.c +++ b/servers/slapd/tools/ldbmtest.c @@ -27,7 +27,7 @@ #include #endif -#include "ldapconfig.h" +#include "ldap_defaults.h" #include "../slap.h" #include "../back-ldbm/back-ldbm.h" @@ -535,7 +535,7 @@ edit_entry( char c, Datum *data ) char *editor; if ( (editor = getenv( "EDITOR" )) == NULL ) { - editor = DEFAULT_EDITOR; + editor = LDAP_EDITOR; } execl( editor, editor, tmpname, NULL ); perror( "execl" ); diff --git a/servers/slapd/tools/ldif2id2children-bdb2.c b/servers/slapd/tools/ldif2id2children-bdb2.c index cb015136f4..1aac3017ea 100644 --- a/servers/slapd/tools/ldif2id2children-bdb2.c +++ b/servers/slapd/tools/ldif2id2children-bdb2.c @@ -9,7 +9,7 @@ #include #include -#include "ldapconfig.h" +#include "ldap_defaults.h" #include "../slap.h" #include "../back-bdb2/back-bdb2.h" diff --git a/servers/slapd/tools/ldif2id2children.c b/servers/slapd/tools/ldif2id2children.c index a622d0ff93..1f87b40119 100644 --- a/servers/slapd/tools/ldif2id2children.c +++ b/servers/slapd/tools/ldif2id2children.c @@ -9,7 +9,7 @@ #include #include -#include "ldapconfig.h" +#include "ldap_defaults.h" #include "../slap.h" #include "../back-ldbm/back-ldbm.h" diff --git a/servers/slapd/tools/ldif2id2entry-bdb2.c b/servers/slapd/tools/ldif2id2entry-bdb2.c index 18c6357fb3..57cef5e506 100644 --- a/servers/slapd/tools/ldif2id2entry-bdb2.c +++ b/servers/slapd/tools/ldif2id2entry-bdb2.c @@ -9,7 +9,7 @@ #include #include -#include "ldapconfig.h" +#include "ldap_defaults.h" #include "../slap.h" #include "../back-bdb2/back-bdb2.h" diff --git a/servers/slapd/tools/ldif2id2entry.c b/servers/slapd/tools/ldif2id2entry.c index 832c9818ce..ad63dc0418 100644 --- a/servers/slapd/tools/ldif2id2entry.c +++ b/servers/slapd/tools/ldif2id2entry.c @@ -9,7 +9,7 @@ #include #include -#include "ldapconfig.h" +#include "ldap_defaults.h" #include "../slap.h" #include "../back-ldbm/back-ldbm.h" diff --git a/servers/slapd/tools/ldif2index-bdb2.c b/servers/slapd/tools/ldif2index-bdb2.c index e3930b30fe..d832256607 100644 --- a/servers/slapd/tools/ldif2index-bdb2.c +++ b/servers/slapd/tools/ldif2index-bdb2.c @@ -12,7 +12,7 @@ #include "../slap.h" #include "../back-bdb2/back-bdb2.h" -#include "ldapconfig.h" +#include "ldap_defaults.h" #include "ldif.h" #define MAXARGS 100 diff --git a/servers/slapd/tools/ldif2index.c b/servers/slapd/tools/ldif2index.c index 4343d4bb21..6dfe83f382 100644 --- a/servers/slapd/tools/ldif2index.c +++ b/servers/slapd/tools/ldif2index.c @@ -12,7 +12,7 @@ #include "../slap.h" #include "../back-ldbm/back-ldbm.h" -#include "ldapconfig.h" +#include "ldap_defaults.h" #include "ldif.h" #define MAXARGS 100 diff --git a/servers/slapd/tools/ldif2ldbm-bdb2.c b/servers/slapd/tools/ldif2ldbm-bdb2.c index b5e2309af5..8ba47bb95a 100644 --- a/servers/slapd/tools/ldif2ldbm-bdb2.c +++ b/servers/slapd/tools/ldif2ldbm-bdb2.c @@ -10,7 +10,7 @@ #include -#include "ldapconfig.h" +#include "ldap_defaults.h" #include "../slap.h" #include "../back-bdb2/back-bdb2.h" #include "ldif.h" @@ -55,7 +55,7 @@ main( int argc, char **argv ) struct berval *vals[2]; Avlnode *avltypes = NULL; - sbindir = DEFAULT_SBINDIR; + sbindir = LDAP_SBINDIR; tailorfile = SLAPD_DEFAULT_CONFIGFILE; dbnum = -1; while ( (i = getopt( argc, argv, "d:e:s:f:i:j:n:" )) != EOF ) { diff --git a/servers/slapd/tools/ldif2ldbm.c b/servers/slapd/tools/ldif2ldbm.c index df8c2698ce..407401196d 100644 --- a/servers/slapd/tools/ldif2ldbm.c +++ b/servers/slapd/tools/ldif2ldbm.c @@ -12,7 +12,7 @@ #include #endif -#include "ldapconfig.h" +#include "ldap_defaults.h" #include "../slap.h" #include "../back-ldbm/back-ldbm.h" #include "ldif.h" @@ -61,7 +61,7 @@ main( int argc, char **argv ) ldbm_ignore_nextid_file = 1; - sbindir = DEFAULT_SBINDIR; + sbindir = LDAP_SBINDIR; tailorfile = SLAPD_DEFAULT_CONFIGFILE; dbnum = -1; while ( (i = getopt( argc, argv, "d:e:s:f:i:j:n:" )) != EOF ) { diff --git a/servers/slurpd/slurp.h b/servers/slurpd/slurp.h index 768eef9a6a..839f525828 100644 --- a/servers/slurpd/slurp.h +++ b/servers/slurpd/slurp.h @@ -36,7 +36,7 @@ #include "ldap_log.h" #include "ldap_pvt_thread.h" -#include "ldapconfig.h" +#include "ldap_defaults.h" #include "ldif.h" diff --git a/tests/progs/slapd-tester.c b/tests/progs/slapd-tester.c index a05fa34164..902b295354 100644 --- a/tests/progs/slapd-tester.c +++ b/tests/progs/slapd-tester.c @@ -15,7 +15,7 @@ #include #endif -#include "ldapconfig.h" +#include "ldap_defaults.h" #define SEARCHCMD "slapd-search" @@ -167,7 +167,7 @@ main( int argc, char **argv ) */ sanum = 0; - sprintf( scmd, "%s%s%s", progdir, DIRSEP, SEARCHCMD ); + sprintf( scmd, "%s%s%s", progdir, LDAP_DIRSEP, SEARCHCMD ); sargs[sanum++] = scmd; sargs[sanum++] = "-h"; sargs[sanum++] = host; @@ -186,7 +186,7 @@ main( int argc, char **argv ) */ ranum = 0; - sprintf( rcmd, "%s%s%s", progdir, DIRSEP, READCMD ); + sprintf( rcmd, "%s%s%s", progdir, LDAP_DIRSEP, READCMD ); rargs[ranum++] = rcmd; rargs[ranum++] = "-h"; rargs[ranum++] = host; @@ -203,7 +203,7 @@ main( int argc, char **argv ) */ aanum = 0; - sprintf( acmd, "%s%s%s", progdir, DIRSEP, ADDCMD ); + sprintf( acmd, "%s%s%s", progdir, LDAP_DIRSEP, ADDCMD ); aargs[aanum++] = acmd; aargs[aanum++] = "-h"; aargs[aanum++] = host; @@ -254,7 +254,7 @@ get_file_name( char *dirname, char *filename ) { char buf[MAXPATHLEN]; - sprintf( buf, "%s%s%s", dirname, DIRSEP, filename ); + sprintf( buf, "%s%s%s", dirname, LDAP_DIRSEP, filename ); return( strdup( buf )); } -- 2.39.5