From: Kurt Zeilenga Date: Thu, 17 Sep 1998 19:38:07 +0000 (+0000) Subject: Start of slapd. X-Git-Tag: PHP3_TOOL_0_0~18^2~118 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=954b17fbfce95741ec93a7beab6d5cf214aaa796;p=openldap Start of slapd. --- diff --git a/build/top.mk b/build/top.mk index 30b1c515ad..2a3845af5a 100644 --- a/build/top.mk +++ b/build/top.mk @@ -17,7 +17,7 @@ bindir = @bindir@ sbindir = @sbindir@ libexecdir = @libexecdir@ datadir = @datadir@ -sysconfdir = @sysconfdir@ +sysconfdir = @sysconfdir@/ldap sharedstatedir = @sharedstatedir@ localstatedir = @localstatedir@ libdir = @libdir@ diff --git a/configure.in b/configure.in index c1095c1939..e17188132e 100644 --- a/configure.in +++ b/configure.in @@ -348,7 +348,6 @@ dnl contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \ dnl contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \ dnl contrib/whois++/Makefile:build/top.mk:contrib/whois++/Makefile.in:build/rules.mk \ dnl servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \ -dnl servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \ dnl servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \ dnl servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \ dnl servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \ @@ -376,6 +375,7 @@ libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib. libraries/liblthread/Makefile:build/top.mk:libraries/liblthread/Makefile.in:build/lib.mk \ libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk \ servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \ +servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \ servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \ tests/Makefile:build/top.mk:tests/Makefile.in \ Makefile:build/top.mk:Makefile.in:build/dir.mk \ diff --git a/servers/slapd/Makefile.in b/servers/slapd/Makefile.in new file mode 100644 index 0000000000..b28817378a --- /dev/null +++ b/servers/slapd/Makefile.in @@ -0,0 +1,109 @@ +## +## Makefile.in for slapd +## +PROGRAMS=slapd +XPROGRAMS=libbackends.a .backend +SRCS = main.c daemon.c connection.c search.c filter.c add.c charray.c \ + attr.c entry.c config.c backend.c result.c operation.c \ + dn.c compare.c modify.c delete.c modrdn.c ch_malloc.c \ + value.c ava.c bind.c unbind.c abandon.c filterentry.c \ + phonetic.c acl.c str2filter.c aclparse.c init.c \ + detach.c strdup.c tempnam.c repl.c lock.c \ + schema.c schemaparse.c monitor.c configinfo.c +OBJS = main.o daemon.o connection.o search.o filter.o add.o charray.o \ + attr.o entry.o config.o backend.o result.o operation.o \ + dn.o compare.o modify.o delete.o modrdn.o ch_malloc.o \ + value.o ava.o bind.o unbind.o abandon.o filterentry.o \ + phonetic.o acl.o str2filter.o aclparse.o init.o \ + detach.o strdup.o tempnam.o repl.o lock.o \ + schema.o schemaparse.o monitor.o configinfo.o + +BUILD_OPT = "--enable-slapd" +BUILD_SRV = @BUILD_SLAPD@ + +all-srv: FORCE + $(MAKE) $(MFLAGS) backendslib + $(MAKE) $(MFLAGS) slapd + (cd tools; $(MAKE) $(MFLAGS) all) + +XDEFS = @SLURPD_DEFS@ @LTHREAD_DEFS@ +XLIBS = @SLURPD_LIBS@ -lavl -llutil -llthread @LTHREAD_LIBS@ + +slapd: version.o + $(CC) $(LDFLGS) -o $@ $(OBJS) version.o $(LIBS) + +backendslib: FORCE + @for i in back-*; do \ + if [ -d $$i ]; then \ + echo " "; echo " cd $$i; $(MAKE) $(MFLAGS) all"; \ + ( cd $$i; $(MAKE) $(MFLAGS) all ); \ + fi; \ + done; \ + echo " "; \ + $(MAKE) $(MFLAGS) libbackends.a + +libbackends.a: .backend + @$(RM) -r tmp + @$(MKDIR) tmp + @-for i in back-*/*.a; do \ + ( \ + cd tmp; \ + $(AR) x ../$$i; \ + pre=`echo $$i | sed -e 's/\/.*$$//' -e 's/back-//'`; \ + for j in *.o; do \ + mv $$j $${pre}$$j; \ + done; \ + $(AR) ruv libbackends.a *.o 2>&1 | grep -v truncated; \ + $(RM) *.o __.SYMDEF; \ + echo "added backend library $$i"; \ + ); \ + done + @mv -f tmp/libbackends.a ./libbackends.a + @$(RM) -r tmp + @if [ ! -z "$(RANLIB)" ]; then \ + $(RANLIB) libbackends.a; \ + fi + @ls -l libbackends.a + +version.c: libbackends.a $(OBJS) \ + $(LDAP_LIBDIR)/liblber.a \ + $(LDAP_LIBDIR)/liblldbm.a \ + $(LDAP_LIBDIR)/liblavl.a \ + $(LDAP_LIBDIR)/liblldif.a \ + $(LDAP_LIBDIR)/liblthread.a + $(RM) $@ + (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \ + t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ + -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ + -e "s|%VERSION%|$${v}|" \ + < Version.c > $@) + +clean: FORCE + @for i in back-* tools; do \ + if [ -d $$i ] ; then \ + echo; echo " cd $$i; $(MAKE) $(MFLAGS) clean"; \ + ( cd $$i; $(MAKE) $(MFLAGS) clean ); \ + fi; \ + done + +install: install-slapd install-conf install-tools + +install-slapd: FORCE + @-$(MKDIR) $(libexecdir) + $(INSTALL) $(INSTALLFLAGS) -m 755 slapd $(libexecdir) + +install-conf: FORCE + @-$(MKDIR) -p $(sysconfdir) + $(SED) -e 's;%ETCDIR%;$(sysconfdir);' slapd.conf > /tmp/slapd.$$ + -$(MV) $(sysconfdir)/slapd.conf $(sysconfdir)/slapd.conf- + $(INSTALL) $(INSTALLFLAGS) -m 644 /tmp/slapd.$$ $(sysconfdir)/slapd.conf + $(RM) -f /tmp/slapd.$$ + -$(MV) $(sysconfdir)/slapd.at.conf $(sysconfdir)/slapd.at.conf- + $(INSTALL) $(INSTALLFLAGS) -m 644 slapd.at.conf $(sysconfdir) + -$(MV) $(sysconfdir)/slapd.oc.conf $(sysconfdir)/slapd.oc.conf- + $(INSTALL) $(INSTALLFLAGS) -m 644 slapd.oc.conf $(sysconfdir) + +install-tools: FORCE + @-$(MKDIR) $(sbindir) + (cd tools; $(MAKE) $(MFLAGS) install) + diff --git a/servers/slapd/repl.c b/servers/slapd/repl.c index 028b191962..0a3d7c4631 100644 --- a/servers/slapd/repl.c +++ b/servers/slapd/repl.c @@ -5,7 +5,7 @@ #include #include #include -#include +#include "slap.h" extern pthread_mutex_t replog_mutex; extern pthread_mutex_t entry2str_mutex;