# man pages are put under MANDIR
# programs end-users will run are put in BINDIR
#
-INSTROOT=/usr/local
-ETCDIR= $(INSTROOT)/etc
+PREFIX?=/usr/local
+INSTROOT=${PREFIX}
+ETCDIR= $(INSTROOT)/etc/ldap
INCLUDEDIR= $(INSTROOT)/include
LIBDIR= $(INSTROOT)/lib
MANDIR= $(INSTROOT)/man
#############################################################################
# Passed to every compile (cc or gcc). This is where you put -O or -g, etc.
#EXTRACFLAGS=-g
+EXTRACFLAGS=-O
# Passed to every link (ld). Include -g here if you did in EXTRACFLAGS.
#EXTRALDFLAGS=-g
# four choices: Berkeley db b-tree, Berkeley db hash, GNU dbm, or ndbm.
#
# berkeley db btree package
-#LDBMBACKEND=-DLDBM_USE_DBBTREE
-#LDBMINCLUDE=-I/usr/local/db/include
+LDBMBACKEND=-DLDBM_USE_DBBTREE
+LDBMINCLUDE=-I/usr/include
#LDBMLIB=-ldb
# berkeley db hash package
#LDBMBACKEND=-DLDBM_USE_DBHASH
#LDBMINCLUDE=-I/usr/local/gdbm/include
#LDBMLIB=-lgdbm
# standard unix ndbm
-LDBMBACKEND=-DLDBM_USE_NDBM
+#LDBMBACKEND=-DLDBM_USE_NDBM
#
# if you want to use a non-default threads package change these lines
#THREADS=-DNO_THREADS
$(INSTALL) $(INSTALLFLAGS) -m 644 $$TMPMAN $(INSTDIR)/$$page; \
if [ -f "$$page.links" ]; then \
for link in `$(CAT) $$page.links`; do \
- echo ".so man$(SECT)/$$page" > $$TMPMAN; \
echo "installing $(INSTDIR)/$$link as link to $$page"; \
- $(INSTALL) $(INSTALLFLAGS) -m 644 $$TMPMAN \
- $(INSTDIR)/$$link; \
+ ln -sf $$page.gz $(INSTDIR)/$$link.gz; \
done; \
fi; \
done; \
$(INSTALL) $(INSTALLFLAGS) -m 644 $$TMPMAN $(INSTDIR)/$$page; \
if [ -f "$$page.links" ]; then \
for link in `$(CAT) $$page.links`; do \
- echo ".so man$(SECT)/$$page" > $$TMPMAN; \
echo "installing $(INSTDIR)/$$link as link to $$page"; \
- $(INSTALL) $(INSTALLFLAGS) -m 644 $$TMPMAN \
- $(INSTDIR)/$$link; \
+ ln -sf $$page.gz $(INSTDIR)/$$link.gz; \
done; \
fi; \
done; \
-ldap_modrdn_s
-ldap_modrdn2
-ldap_modrdn2_s
+ldap_modrdn_s.3
+ldap_modrdn2.3
+ldap_modrdn2_s.3
$(INSTALL) $(INSTALLFLAGS) -m 644 $$TMPMAN $(INSTDIR)/$$page; \
if [ -f "$$page.links" ]; then \
for link in `$(CAT) $$page.links`; do \
- echo ".so man$(SECT)/$$page" > $$TMPMAN; \
echo "installing $(INSTDIR)/$$link as link to $$page"; \
- $(INSTALL) $(INSTALLFLAGS) -m 644 $$TMPMAN \
- $(INSTDIR)/$$link; \
+ ln -sf $$page.gz $(INSTDIR)/$$link.gz; \
done; \
fi; \
done; \
$(INSTALL) $(INSTALLFLAGS) -m 644 $$TMPMAN $(INSTDIR)/$$page; \
if [ -f "$$page.links" ]; then \
for link in `$(CAT) $$page.links`; do \
- echo ".so man$(SECT)/$$page" > $$TMPMAN; \
echo "installing $(INSTDIR)/$$link as link to $$page"; \
- $(INSTALL) $(INSTALLFLAGS) -m 644 $$TMPMAN \
- $(INSTDIR)/$$link; \
+ ln -sf $$page.gz $(INSTDIR)/$$link.gz; \
done; \
fi; \
done; \
#if defined(NeXT) || defined(VMS)
#include <stdlib.h>
#else /* next || vms */
+#ifndef __FreeBSD__
#include <malloc.h>
+#endif
#endif /* next || vms */
#if defined(BC31) || defined(_WIN32)
#include <stdarg.h>
#if defined(NeXT) || defined(VMS)
#include <stdlib.h>
#else /* next || vms */
+#ifndef __FreeBSD__
#include <malloc.h>
+#endif
#endif /* next || vms */
#if defined( BC31 ) || defined( _WIN32 )
#include <stdarg.h>
#if defined(NeXT) || defined(VMS)
#include <stdlib.h>
#else /* next || vms */
+#ifndef __FreeBSD__
#include <malloc.h>
+#endif
#endif /* next || vms */
#include <errno.h>
#include <sys/types.h>
for ( i = 0; i < nbackends; i++ ) {
for ( j = 0; backends[i].be_suffix != NULL &&
backends[i].be_suffix[j] != NULL; j++ ) {
+ /* Add greg@greg.rim.or.jp
+ * It's quick hack for cheep client
+ * Some browser offer a NULL base at ldap_search
+ */
+ if(dnlen == 0) {
+ Debug( LDAP_DEBUG_TRACE, "select_backend: use default backend\n", 0, 0, 0 );
+ return (&backends[i]);
+ }
len = strlen( backends[i].be_suffix[j] );
if ( len > dnlen ) {
#else /* USE_SYSCONF */
dtblsize = getdtablesize();
#endif /* USE_SYSCONF */
-
+ /*
+ * Add greg@greg.rim.or.jp
+ */
+ if(dtblsize > FD_SETSIZE) {
+ dtblsize = FD_SETSIZE;
+ }
c = (Connection *) ch_calloc( 1, dtblsize * sizeof(Connection) );
for ( i = 0; i < dtblsize; i++ ) {
(void) SIGNAL( SIGUSR1, (void *) do_nothing );
(void) SIGNAL( SIGUSR2, (void *) set_shutdown );
(void) SIGNAL( SIGTERM, (void *) set_shutdown );
+ (void) SIGNAL( SIGINT, (void *) set_shutdown );
(void) SIGNAL( SIGHUP, (void *) set_shutdown );
Debug( LDAP_DEBUG_ANY, "slapd starting\n", 0, 0, 0 );
pthread_kill( listener_tid, SIGUSR1 );
(void) SIGNAL( SIGUSR2, (void *) set_shutdown );
(void) SIGNAL( SIGTERM, (void *) set_shutdown );
+ (void) SIGNAL( SIGINT, (void *) set_shutdown );
(void) SIGNAL( SIGHUP, (void *) set_shutdown );
}
extern char *str_getline( char **next );
extern void ch_free( char *p );
+#if !(defined(BSD) && (BSD >= 199306))
extern char *sys_errlist[];
+#endif
/* Forward references */
static Rh *get_repl_hosts( char *, int *, char ** );
extern void Re_dump();
#endif /* NEEDPROTOS */
-
+#if !(defined(BSD) && (BSD >= 199306))
extern char *sys_errlist[];
-
+#endif
/*
* Lock the replication queue.