From: Kurt Zeilenga Date: Sun, 9 Aug 1998 01:05:15 +0000 (+0000) Subject: Import of FreeBSD LDAP 3.3 Port X-Git-Tag: FreeBSD_3_3 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=8b2170bcf4a5c85b39840f481dd55064015bd6ad;p=openldap Import of FreeBSD LDAP 3.3 Port --- diff --git a/Make-common b/Make-common index 32683c7652..405842cc4f 100644 --- a/Make-common +++ b/Make-common @@ -28,8 +28,9 @@ # 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 @@ -45,6 +46,7 @@ RUNTIMEETCDIR= $(ETCDIR) ############################################################################# # 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 @@ -122,8 +124,8 @@ SLAPD_BACKENDS= -DLDAP_LDBM -DLDAP_SHELL -DLDAP_PASSWD # 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 @@ -134,7 +136,7 @@ SLAPD_BACKENDS= -DLDAP_LDBM -DLDAP_SHELL -DLDAP_PASSWD #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 diff --git a/doc/man/man1/Make-template b/doc/man/man1/Make-template index dfc4a51369..5b7a9206ad 100644 --- a/doc/man/man1/Make-template +++ b/doc/man/man1/Make-template @@ -31,10 +31,8 @@ install: FORCE $(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; \ diff --git a/doc/man/man3/Make-template b/doc/man/man3/Make-template index 6e153f694f..a91cb2efbe 100644 --- a/doc/man/man3/Make-template +++ b/doc/man/man3/Make-template @@ -31,10 +31,8 @@ install: FORCE $(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; \ diff --git a/doc/man/man3/ldap_modrdn.3.links b/doc/man/man3/ldap_modrdn.3.links index 67607878ad..86063e271d 100644 --- a/doc/man/man3/ldap_modrdn.3.links +++ b/doc/man/man3/ldap_modrdn.3.links @@ -1,3 +1,3 @@ -ldap_modrdn_s -ldap_modrdn2 -ldap_modrdn2_s +ldap_modrdn_s.3 +ldap_modrdn2.3 +ldap_modrdn2_s.3 diff --git a/doc/man/man5/Make-template b/doc/man/man5/Make-template index 3d2d5544bf..828df9b871 100644 --- a/doc/man/man5/Make-template +++ b/doc/man/man5/Make-template @@ -31,10 +31,8 @@ install: FORCE $(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; \ diff --git a/doc/man/man8/Make-template b/doc/man/man8/Make-template index 55899f5274..d256bf5792 100644 --- a/doc/man/man8/Make-template +++ b/doc/man/man8/Make-template @@ -31,10 +31,8 @@ install: FORCE $(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; \ diff --git a/libraries/liblber/decode.c b/libraries/liblber/decode.c index a722c9eb7a..83242a02a8 100644 --- a/libraries/liblber/decode.c +++ b/libraries/liblber/decode.c @@ -20,7 +20,9 @@ #if defined(NeXT) || defined(VMS) #include #else /* next || vms */ +#ifndef __FreeBSD__ #include +#endif #endif /* next || vms */ #if defined(BC31) || defined(_WIN32) #include diff --git a/libraries/liblber/encode.c b/libraries/liblber/encode.c index cd95f8932b..d6b1304d25 100644 --- a/libraries/liblber/encode.c +++ b/libraries/liblber/encode.c @@ -20,7 +20,9 @@ #if defined(NeXT) || defined(VMS) #include #else /* next || vms */ +#ifndef __FreeBSD__ #include +#endif #endif /* next || vms */ #if defined( BC31 ) || defined( _WIN32 ) #include diff --git a/libraries/liblber/io.c b/libraries/liblber/io.c index 081f386794..99cc2f3999 100644 --- a/libraries/liblber/io.c +++ b/libraries/liblber/io.c @@ -25,7 +25,9 @@ #if defined(NeXT) || defined(VMS) #include #else /* next || vms */ +#ifndef __FreeBSD__ #include +#endif #endif /* next || vms */ #include #include diff --git a/servers/slapd/backend.c b/servers/slapd/backend.c index 998bfa8c6a..8131b90b77 100644 --- a/servers/slapd/backend.c +++ b/servers/slapd/backend.c @@ -150,6 +150,14 @@ select_backend( char * dn ) 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 ) { diff --git a/servers/slapd/daemon.c b/servers/slapd/daemon.c index 161fb79cf0..863ca497d3 100644 --- a/servers/slapd/daemon.c +++ b/servers/slapd/daemon.c @@ -68,7 +68,12 @@ daemon( #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++ ) { @@ -130,6 +135,7 @@ daemon( (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 ); @@ -352,6 +358,7 @@ set_shutdown() 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 ); } diff --git a/servers/slurpd/re.c b/servers/slurpd/re.c index 4a6dc38237..28d1d09b58 100644 --- a/servers/slurpd/re.c +++ b/servers/slurpd/re.c @@ -31,7 +31,9 @@ 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 ** ); diff --git a/servers/slurpd/rq.c b/servers/slurpd/rq.c index 54adb4da1a..2745d4fe78 100644 --- a/servers/slurpd/rq.c +++ b/servers/slurpd/rq.c @@ -44,9 +44,9 @@ extern void Re_dump( Re *re ); extern void Re_dump(); #endif /* NEEDPROTOS */ - +#if !(defined(BSD) && (BSD >= 199306)) extern char *sys_errlist[]; - +#endif /* * Lock the replication queue.