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/<ldapconfig.h>/<ldap_defaults.h>/
	s/DIRSEP/LDAP_DIRSEP/ & s/DEFAULT_/LDAP_/
This commit is contained in:
Kurt Zeilenga 1999-06-17 03:54:25 +00:00
parent 638efc878b
commit 21e081dc5b
57 changed files with 227 additions and 354 deletions

View file

@ -39,7 +39,7 @@
#include "fax500.h"
#include <ldapconfig.h>
#include <ldap_defaults.h>
#define USER 0
#define GROUP_ERRORS 1

View file

@ -34,7 +34,7 @@
#include "fax500.h"
#include <ldapconfig.h>
#include <ldap_defaults.h>
#define DEFAULT_PORT 79
#define DEFAULT_SIZELIMIT 50

View file

@ -34,7 +34,7 @@
#include "disptmpl.h"
#include "ldapconfig.h"
#include "ldap_defaults.h"
int dosyslog = 1;

View file

@ -35,7 +35,7 @@
#include <sys/resource.h>
#endif
#include "ldapconfig.h"
#include "ldap_defaults.h"
#include "lber.h"
#include "ldap.h"

View file

@ -46,7 +46,7 @@
#include "disptmpl.h"
#include "ldapconfig.h"
#include "ldap_defaults.h"
int debug;
int ldap_syslog;

View file

@ -38,7 +38,7 @@
#include "lber.h"
#include "ldap.h"
#include "ldapconfig.h"
#include "ldap_defaults.h"
#ifndef MAIL500_BOUNCEFROM
#define MAIL500_BOUNCEFROM "<>"

View file

@ -18,7 +18,7 @@
#include <fcntl.h>
#endif
#include "ldapconfig.h"
#include "ldap_defaults.h"
#include "rcpt500.h"

View file

@ -18,7 +18,7 @@
#include <ac/syslog.h>
#include <ac/unistd.h>
#include "ldapconfig.h"
#include "ldap_defaults.h"
#include "rcpt500.h"
int dosyslog = 0;

View file

@ -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: ";

View file

@ -28,7 +28,7 @@
#include <ldap.h>
#include <ldif.h>
#include <ldapconfig.h>
#include <ldap_defaults.h>
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;

View file

@ -32,13 +32,13 @@
#include <lutil_md5.h>
#include <lutil_sha1.h>
#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

View file

@ -28,7 +28,7 @@
#include <lber.h>
#include <ldap.h>
#include <ldapconfig.h>
#include <ldap_defaults.h>
#include "ud.h"

View file

@ -32,7 +32,7 @@
#include <lber.h>
#include <ldap.h>
#include <ldapconfig.h>
#include <ldap_defaults.h>
#include "ud.h"
static int load_editor( void );

View file

@ -26,7 +26,7 @@
#include <lber.h>
#include <ldap.h>
#include <ldapconfig.h>
#include <ldap_defaults.h>
#include "ud.h"
static char * bind_and_fetch(char *name);

View file

@ -46,7 +46,7 @@
#include <lber.h>
#include <ldap.h>
#include <ldapconfig.h>
#include <ldap_defaults.h>
#include "ud.h"
/*

View file

@ -26,7 +26,7 @@
#include <lber.h>
#include <ldap.h>
#include <ldapconfig.h>
#include <ldap_defaults.h>
#include "ud.h"

View file

@ -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

55
include/ldap_config.h.in Normal file
View file

@ -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 */

58
include/ldap_config.h.nt Normal file
View file

@ -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 */

View file

@ -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%"
#define DEFAULT_LDAP_CONF_FILE "%SYSCONFDIR%/ldap.conf"
#define DEFAULT_LDAP_USERRC_FILE "ldaprc"
#define DEFAULT_LDAP_ENV_PREFIX "LDAP"
#include <ldap_config.h>
#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\" <Dir-Query>"
/* 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 */

View file

@ -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\" <Dir-Query>"
/* 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 */

View file

@ -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 */

View file

@ -13,7 +13,7 @@
#include <ac/time.h>
#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 );

View file

@ -28,7 +28,7 @@
#include "disptmpl.h"
#include "ldap-int.h"
#include "ldapconfig.h"
#include "ldap_defaults.h"
#define writeptype ldap_writeptype

View file

@ -21,7 +21,7 @@
#include <ac/time.h>
#include "ldap-int.h"
#include "ldapconfig.h"
#include "ldap_defaults.h"
typedef int (*cancelptype) LDAP_P(( void *cancelparm ));

View file

@ -35,7 +35,7 @@
#include <lber.h>
#include <ldap.h>
#include <ldapconfig.h>
#include <ldap_defaults.h>
char *
getpass( const char *prompt )

View file

@ -9,7 +9,7 @@
#include <sys/types.h>
#include <ac/string.h>
#include "ldapconfig.h"
#include "ldap_defaults.h"
//#include "slap.h"
#include "slapdmsg.h"

View file

@ -18,7 +18,7 @@
#include <sys/param.h>
#endif
#include "ldapconfig.h"
#include "ldap_defaults.h"
#include "slap.h"
#ifdef LDAP_DEBUG

View file

@ -15,7 +15,7 @@
#include <sys/param.h>
#endif
#include "ldapconfig.h"
#include "ldap_defaults.h"
#include "slap.h"
#include "back-bdb2.h"

View file

@ -7,7 +7,7 @@
#include <ac/string.h>
#include <ac/socket.h>
#include "ldapconfig.h"
#include "ldap_defaults.h"
#include "slap.h"
#include "back-bdb2.h"

View file

@ -12,7 +12,7 @@
#include <direct.h>
#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 );

View file

@ -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,

View file

@ -16,7 +16,7 @@
#include <ac/time.h>
#include <ac/unistd.h>
#include "ldapconfig.h"
#include "ldap_defaults.h"
#include "slap.h"
#include "back-bdb2.h"

View file

@ -15,7 +15,7 @@
#include <sys/param.h>
#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 );

View file

@ -7,7 +7,7 @@
#include <ac/string.h>
#include <ac/socket.h>
#include "ldapconfig.h"
#include "ldap_defaults.h"
#include "slap.h"
#include "back-ldbm.h"

View file

@ -8,7 +8,7 @@
#include <ac/string.h>
#include <ac/socket.h>
#include "ldapconfig.h"
#include "ldap_defaults.h"
#include "slap.h"
#include "back-ldbm.h"

View file

@ -11,7 +11,7 @@
#include <ac/ctype.h>
#include <ac/socket.h>
#include "ldapconfig.h"
#include "ldap_defaults.h"
#include "slap.h"
#define MAXARGS 100

View file

@ -17,7 +17,7 @@
#include <ac/string.h>
#include <ac/socket.h>
#include "ldapconfig.h"
#include "ldap_defaults.h"
#include "slap.h"
#if defined( SLAPD_CONFIG_DN )

View file

@ -10,7 +10,7 @@
#include <ac/time.h>
#include <ac/unistd.h>
#include "ldapconfig.h"
#include "ldap_defaults.h"
#include "slap.h"
#ifdef HAVE_TCPD

View file

@ -11,7 +11,7 @@
#include <ac/signal.h>
#include <ac/errno.h>
#include "ldapconfig.h"
#include "ldap_defaults.h"
#include "slap.h"
#include "lutil.h" /* Get lutil_detach() */

View file

@ -18,7 +18,7 @@
#include <ac/string.h>
#include <ac/time.h>
#include "ldapconfig.h"
#include "ldap_defaults.h"
#include "slap.h"
#if defined( SLAPD_MONITOR_DN )

View file

@ -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" );

View file

@ -11,7 +11,7 @@
//#include <ac/signal.h>
//#include <ac/errno.h>
#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 );

View file

@ -13,7 +13,7 @@
#include <stdio.h>
#include "ldapconfig.h"
#include "ldap_defaults.h"
#include "slap.h"
void

View file

@ -7,7 +7,7 @@
#include <ac/string.h>
#include <ac/socket.h>
#include "ldapconfig.h"
#include "ldap_defaults.h"
#include "slap.h"
static char * oc_check_required(Entry *e, char *ocname);

View file

@ -17,7 +17,7 @@
#include <ac/string.h>
#include <ac/socket.h>
#include "ldapconfig.h"
#include "ldap_defaults.h"
#include "slap.h"

View file

@ -27,7 +27,7 @@
#include <io.h>
#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" );

View file

@ -9,7 +9,7 @@
#include <ac/socket.h>
#include <ac/unistd.h>
#include "ldapconfig.h"
#include "ldap_defaults.h"
#include "../slap.h"
#include "../back-bdb2/back-bdb2.h"

View file

@ -9,7 +9,7 @@
#include <ac/socket.h>
#include <ac/unistd.h>
#include "ldapconfig.h"
#include "ldap_defaults.h"
#include "../slap.h"
#include "../back-ldbm/back-ldbm.h"

View file

@ -9,7 +9,7 @@
#include <ac/socket.h>
#include <ac/unistd.h>
#include "ldapconfig.h"
#include "ldap_defaults.h"
#include "../slap.h"
#include "../back-bdb2/back-bdb2.h"

View file

@ -9,7 +9,7 @@
#include <ac/socket.h>
#include <ac/unistd.h>
#include "ldapconfig.h"
#include "ldap_defaults.h"
#include "../slap.h"
#include "../back-ldbm/back-ldbm.h"

View file

@ -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

View file

@ -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

View file

@ -10,7 +10,7 @@
#include <sys/param.h>
#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 ) {

View file

@ -12,7 +12,7 @@
#include <sys/param.h>
#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 ) {

View file

@ -36,7 +36,7 @@
#include "ldap_log.h"
#include "ldap_pvt_thread.h"
#include "ldapconfig.h"
#include "ldap_defaults.h"
#include "ldif.h"

View file

@ -15,7 +15,7 @@
#include <sys/param.h>
#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 ));
}