From 5579fec8bba6dbeee1290d131e4fc915ec46dd51 Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Tue, 24 Feb 2004 19:24:25 +0000 Subject: [PATCH] Move daemon.c into a new library of utility routines for linking our programs against but which we don't want to install as a separate library. Change Kerberos and application servers to link against the library if they might need the replacement daemon() function. Add a dummy file to the library in case daemon() is not needed, so we don't have an empty library, which we may not handle properly. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16118 dc483132-0cff-0310-8789-dd5450dbe970 --- src/ChangeLog | 5 ++ src/aclocal.m4 | 1 - src/appl/bsd/ChangeLog | 4 ++ src/appl/bsd/Makefile.in | 8 ++-- src/config/ChangeLog | 5 ++ src/config/post.in | 6 --- src/config/pre.in | 5 ++ src/configure.in | 2 +- src/kadmin/server/ChangeLog | 5 ++ src/kadmin/server/Makefile.in | 6 +-- src/kdc/ChangeLog | 5 ++ src/kdc/Makefile.in | 11 ++--- src/krb524/ChangeLog | 5 ++ src/krb524/Makefile.in | 6 +-- src/lib/krb5/posix/ChangeLog | 4 ++ src/slave/ChangeLog | 5 ++ src/slave/Makefile.in | 6 +-- src/util/ChangeLog | 4 ++ src/util/Makefile.in | 2 +- src/util/apputils/ChangeLog | 6 +++ src/util/apputils/Makefile.in | 47 +++++++++++++++++++ src/util/apputils/configure.in | 6 +++ .../krb5/posix => util/apputils}/daemon.c | 0 src/util/apputils/dummy.c | 1 + 24 files changed, 127 insertions(+), 28 deletions(-) create mode 100644 src/util/apputils/ChangeLog create mode 100644 src/util/apputils/Makefile.in create mode 100644 src/util/apputils/configure.in rename src/{lib/krb5/posix => util/apputils}/daemon.c (100%) create mode 100644 src/util/apputils/dummy.c diff --git a/src/ChangeLog b/src/ChangeLog index 7306fd01e..b8e147246 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2004-02-24 Ken Raeburn + + * aclocal.m4 (KRB5_AC_NEED_DAEMON): Don't use AC_REPLACE_FUNCS. + * configure.in: Configure util/apputils. + 2004-02-13 Ken Raeburn * aclocal.m4 (TRY_PEER_INT): Deleted. diff --git a/src/aclocal.m4 b/src/aclocal.m4 index 0bcefa3b9..030925f95 100644 --- a/src/aclocal.m4 +++ b/src/aclocal.m4 @@ -657,7 +657,6 @@ AC_HELP_STRING([--with-netlib=LIBS], use user defined resolver library), dnl dnl AC_DEFUN(KRB5_AC_NEED_DAEMON, [ -AC_REPLACE_FUNCS(daemon) KRB5_NEED_PROTO([#ifdef HAVE_UNISTD_H #include #endif],daemon,1)])dnl diff --git a/src/appl/bsd/ChangeLog b/src/appl/bsd/ChangeLog index 253439c52..5ccedd292 100644 --- a/src/appl/bsd/ChangeLog +++ b/src/appl/bsd/ChangeLog @@ -1,3 +1,7 @@ +2004-02-24 Ken Raeburn + + * Makefile.in (kshd, klogind): Link against apputils lib. + 2003-08-29 Ken Raeburn * configure.in: Call KRB5_AC_NEED_DAEMON instead of checking diff --git a/src/appl/bsd/Makefile.in b/src/appl/bsd/Makefile.in index 5abbaba5e..a806db507 100644 --- a/src/appl/bsd/Makefile.in +++ b/src/appl/bsd/Makefile.in @@ -66,11 +66,11 @@ install:: ${DESTDIR}$(CLIENT_MANDIR)/`echo $$f|sed '$(transform)'`.1; \ fi -kshd: krshd.o kcmd.o forward.o compat_recv.o $(SETENVOBJ) $(LIBOBJS) $(PTY_DEPLIB) $(KRB4COMPAT_DEPLIBS) - $(CC_LINK) -o kshd krshd.o kcmd.o forward.o compat_recv.o $(SETENVOBJ) $(LIBOBJS) $(KRSHDLIBS) $(PTY_LIB) $(KRB4COMPAT_LIBS) +kshd: krshd.o kcmd.o forward.o compat_recv.o $(SETENVOBJ) $(LIBOBJS) $(PTY_DEPLIB) $(KRB4COMPAT_DEPLIBS) $(APPUTILS_DEPLIB) + $(CC_LINK) -o kshd krshd.o kcmd.o forward.o compat_recv.o $(SETENVOBJ) $(LIBOBJS) $(KRSHDLIBS) $(PTY_LIB) $(KRB4COMPAT_LIBS) $(APPUTILS_LIB) -klogind: krlogind.o kcmd.o forward.o compat_recv.o $(SETENVOBJ) $(LIBOBJS) $(PTY_DEPLIB) $(KRB4COMPAT_DEPLIBS) - $(CC_LINK) -o klogind krlogind.o kcmd.o forward.o compat_recv.o $(SETENVOBJ) $(LIBOBJS) $(PTY_LIB) $(KRB4COMPAT_LIBS) +klogind: krlogind.o kcmd.o forward.o compat_recv.o $(SETENVOBJ) $(LIBOBJS) $(PTY_DEPLIB) $(KRB4COMPAT_DEPLIBS) $(APPUTILS_DEPLIB) + $(CC_LINK) -o klogind krlogind.o kcmd.o forward.o compat_recv.o $(SETENVOBJ) $(LIBOBJS) $(PTY_LIB) $(KRB4COMPAT_LIBS) $(APPUTILS_LIB) install:: for f in kshd klogind; do \ diff --git a/src/config/ChangeLog b/src/config/ChangeLog index 2b0ff32d4..20a11c330 100644 --- a/src/config/ChangeLog +++ b/src/config/ChangeLog @@ -1,3 +1,8 @@ +2004-02-24 Ken Raeburn + + * pre.in (APPUTILS_DEPLIB, APPUTILS_LIB): New vars. + * post.in (daemon.c): Delete rule for copying source file. + 2004-02-18 Tom Yu * shlib.conf (alpha-*-dec-osf*, mips-sgi-irix*): Use $(CC) instead diff --git a/src/config/post.in b/src/config/post.in index 1401a80ef..85f6bb982 100644 --- a/src/config/post.in +++ b/src/config/post.in @@ -193,12 +193,6 @@ $(RECURSE_TARGETS): fi;\ exit $$status -# Some servers need "daemon", but we're not providing it directly -# through a library. We used to provide it through the krb5 library, -# and the source is still there. -daemon.c: $(SRCTOP)/lib/krb5/posix/daemon.c - $(CP) $(SRCTOP)/lib/krb5/posix/daemon.c daemon.c - ## ## end of post.in ############################################################ diff --git a/src/config/pre.in b/src/config/pre.in index 34f91b7e0..4881e294a 100644 --- a/src/config/pre.in +++ b/src/config/pre.in @@ -296,6 +296,7 @@ SS_DEPLIB = $(SS_DEPLIB-@SS_VERSION@) SS_DEPLIB-k5 = $(TOPLIBD)/libss.a SS_DEPLIB-sys = PTY_DEPLIB = $(TOPLIBD)/libpty.a +APPUTILS_DEPLIB = $(TOPLIBD)/libapputils.a KRB5_BASE_DEPLIBS = $(KRB5_DEPLIB) $(CRYPTO_DEPLIB) $(COM_ERR_DEPLIB) KRB4COMPAT_DEPLIBS = $(KRB4_DEPLIB) $(DES425_DEPLIB) $(KRB5_BASE_DEPLIBS) @@ -371,6 +372,10 @@ KADMCLNT_LIBS = -lkadm5clnt $(KADM_COMM_LIBS) # need fixing if ever used on Mac OS X! PTY_LIB = -lpty +# Misc stuff for linking server programs (and maybe some others, +# eventually) but which we don't want to install. +APPUTILS_LIB = -lapputils + # # some more stuff for --with-krb4 KRB4_LIBPATH = @KRB4_LIBPATH@ diff --git a/src/configure.in b/src/configure.in index 0d9500260..4dc3d68bb 100644 --- a/src/configure.in +++ b/src/configure.in @@ -64,7 +64,7 @@ AC_CONFIG_SUBDIRS(util/profile util/pty) if test "$DB_VERSION" = k5 ; then AC_CONFIG_SUBDIRS(util/db2) fi -AC_CONFIG_SUBDIRS(include lib/crypto lib/krb5 lib/des425) +AC_CONFIG_SUBDIRS(include lib/crypto lib/krb5 lib/des425 util/apputils) if test -n "$KRB4_LIB"; then AC_CONFIG_SUBDIRS(lib/krb4) fi diff --git a/src/kadmin/server/ChangeLog b/src/kadmin/server/ChangeLog index f5f29f644..272e53328 100644 --- a/src/kadmin/server/ChangeLog +++ b/src/kadmin/server/ChangeLog @@ -1,3 +1,8 @@ +2004-02-24 Ken Raeburn + + * Makefile.in (OBJS, $(PROG)): Link against apputils lib instead + of using LIBOBJS. + 2003-09-02 Alexandra Ellwood * ovsec_kadmd.c: Added Apple password server support. diff --git a/src/kadmin/server/Makefile.in b/src/kadmin/server/Makefile.in index 21e6aab6c..17406e77a 100644 --- a/src/kadmin/server/Makefile.in +++ b/src/kadmin/server/Makefile.in @@ -10,12 +10,12 @@ PROG_LIBPATH=-L$(TOPLIBD) PROG_RPATH=$(KRB5_LIBDIR) PROG = kadmind -OBJS = kadm_rpc_svc.o server_stubs.o ovsec_kadmd.o schpw.o misc.o server_glue_v1.o @LIBOBJS@ +OBJS = kadm_rpc_svc.o server_stubs.o ovsec_kadmd.o schpw.o misc.o server_glue_v1.o all:: $(PROG) -$(PROG): $(OBJS) $(KADMSRV_DEPLIBS) $(KRB5_BASE_DEPLIBS) - $(CC_LINK) -o $(PROG) $(OBJS) $(KADMSRV_LIBS) $(KRB5_BASE_LIBS) +$(PROG): $(OBJS) $(KADMSRV_DEPLIBS) $(KRB5_BASE_DEPLIBS) $(APPUTILS_DEPLIB) + $(CC_LINK) -o $(PROG) $(OBJS) $(KADMSRV_LIBS) $(KRB5_BASE_LIBS) $(APPUTILS_LIB) install:: $(INSTALL_PROGRAM) $(PROG) ${DESTDIR}$(SERVER_BINDIR)/$(PROG) diff --git a/src/kdc/ChangeLog b/src/kdc/ChangeLog index 0732bf918..ccc42d629 100644 --- a/src/kdc/ChangeLog +++ b/src/kdc/ChangeLog @@ -1,3 +1,8 @@ +2004-02-24 Ken Raeburn + + * Makefile.in (OBJS, krb5kdc, fakeka): Link against apputils lib + instead of using LIBOBJ. + 2004-02-19 Ken Hornstein * fakeka.c (main): Bug from David Thompson . diff --git a/src/kdc/Makefile.in b/src/kdc/Makefile.in index efbc92857..d3079f6e7 100644 --- a/src/kdc/Makefile.in +++ b/src/kdc/Makefile.in @@ -46,8 +46,7 @@ OBJS= \ policy.o \ extern.o \ replay.o \ - kerberos_v4.o \ - @LIBOBJS@ + kerberos_v4.o RT_OBJS= rtest.o \ kdc_util.o \ @@ -68,14 +67,14 @@ kdc5_err.h: kdc5_err.et kdc5_err.o: kdc5_err.h -krb5kdc: $(OBJS) $(KADMSRV_DEPLIBS) $(KRB4COMPAT_DEPLIBS) - $(CC_LINK) -o krb5kdc $(OBJS) $(KADMSRV_LIBS) $(KRB4COMPAT_LIBS) +krb5kdc: $(OBJS) $(KADMSRV_DEPLIBS) $(KRB4COMPAT_DEPLIBS) $(APPUTILS_DEPLIB) + $(CC_LINK) -o krb5kdc $(OBJS) $(KADMSRV_LIBS) $(KRB4COMPAT_LIBS) $(APPUTILS_LIB) rtest: $(RT_OBJS) $(KDB5_DEPLIBS) $(KADM_COMM_DEPLIBS) $(KRB5_BASE_DEPLIBS) $(CC_LINK) -o rtest $(RT_OBJS) $(KDB5_LIBS) $(KADM_COMM_LIBS) $(KRB5_BASE_LIBS) -fakeka: fakeka.o $(KADMSRV_DEPLIBS) $(KRB4COMPAT_DEPLIBS) @LIBOBJS@ - $(CC_LINK) -o fakeka fakeka.o $(KADMSRV_LIBS) $(KRB4COMPAT_LIBS) @LIBOBJS@ +fakeka: fakeka.o $(KADMSRV_DEPLIBS) $(KRB4COMPAT_DEPLIBS) $(APPUTILS_DEPLIB) + $(CC_LINK) -o fakeka fakeka.o $(KADMSRV_LIBS) $(KRB4COMPAT_LIBS) $(APPUTILS_LIB) check-unix:: rtest KRB5_CONFIG=$(SRCTOP)/config-files/krb5.conf ; export KRB5_CONFIG ;\ diff --git a/src/krb524/ChangeLog b/src/krb524/ChangeLog index 3e5cdb1bf..4f1356320 100644 --- a/src/krb524/ChangeLog +++ b/src/krb524/ChangeLog @@ -1,3 +1,8 @@ +2004-02-24 Ken Raeburn + + * Makefile.in (SERVER_OBJS, krb524d): Link against apputils lib + instead of using LIBOBJS. + 2003-12-15 Ezra Peisach * Makefile.in (clean-unix): Clean up more files now that STLIBOBS diff --git a/src/krb524/Makefile.in b/src/krb524/Makefile.in index a451a84c1..8dcd19d1e 100644 --- a/src/krb524/Makefile.in +++ b/src/krb524/Makefile.in @@ -74,11 +74,11 @@ all-windows:: $(OUTPRE)k524init.exe $(K524LIB) krb524test: test.o $(KRB5_DEPLIB) $(KRB4COMPAT_DEPLIBS) $(CC_LINK) -o krb524test test.o $(KRB5_LIB) $(KRB4COMPAT_LIBS) -SERVER_OBJS= krb524d.o cnv_tkt_skey.o conv_princ.o @LIBOBJS@ +SERVER_OBJS= krb524d.o cnv_tkt_skey.o conv_princ.o CLIENT_OBJS= $(OUTPRE)k524init.$(OBJEXT) -krb524d: $(SERVER_OBJS) $(KADMSRV_DEPLIBS) $(KRB5_DEPLIB) $(KRB4COMPAT_DEPLIBS) - $(CC_LINK) -o krb524d $(SERVER_OBJS) $(KADMSRV_LIBS) $(KRB5_LIB) $(KRB4COMPAT_LIBS) +krb524d: $(SERVER_OBJS) $(KADMSRV_DEPLIBS) $(KRB5_DEPLIB) $(KRB4COMPAT_DEPLIBS) $(APPUTILS_DEPLIB) + $(CC_LINK) -o krb524d $(SERVER_OBJS) $(KADMSRV_LIBS) $(KRB5_LIB) $(KRB4COMPAT_LIBS) $(APPUTILS_LIB) k524init: $(CLIENT_OBJS) $(KRB5_DEPLIB) $(KRB4COMPAT_DEPLIBS) $(CC_LINK) -o k524init $(CLIENT_OBJS) $(KRB5_LIB) $(KRB4COMPAT_LIBS) diff --git a/src/lib/krb5/posix/ChangeLog b/src/lib/krb5/posix/ChangeLog index 8c0f0edec..9ba5e1033 100644 --- a/src/lib/krb5/posix/ChangeLog +++ b/src/lib/krb5/posix/ChangeLog @@ -1,3 +1,7 @@ +2004-02-24 Ken Raeburn + + * daemon.c: Moved to util/apputils. + 2003-08-21 Ken Raeburn * Makefile.in (STLIBOBJS, OBJS): Empty. diff --git a/src/slave/ChangeLog b/src/slave/ChangeLog index 7a07be47c..ef545392f 100644 --- a/src/slave/ChangeLog +++ b/src/slave/ChangeLog @@ -1,3 +1,8 @@ +2004-02-24 Ken Raeburn + + * Makefile.in (SERVEROBJS, kpropd): Link against apputils lib + instead of using LIBOBJS. + 2003-08-29 Ken Raeburn * configure.in: Call KRB5_AC_NEED_DAEMON instead of checking diff --git a/src/slave/Makefile.in b/src/slave/Makefile.in index 3f12fc134..3ef6d5617 100644 --- a/src/slave/Makefile.in +++ b/src/slave/Makefile.in @@ -11,7 +11,7 @@ CLIENTSRCS= $(srcdir)/kprop.c CLIENTOBJS= kprop.o SERVERSRCS= $(srcdir)/kpropd.c -SERVEROBJS= kpropd.o @LIBOBJS@ +SERVEROBJS= kpropd.o SRCS= $(CLIENTSRCS) $(SERVERSRCS) @@ -19,8 +19,8 @@ SRCS= $(CLIENTSRCS) $(SERVERSRCS) kprop: $(CLIENTOBJS) $(KRB5_BASE_DEPLIBS) $(CC_LINK) -o kprop $(CLIENTOBJS) $(KRB5_BASE_LIBS) -kpropd: $(SERVEROBJS) $(KRB5_BASE_DEPLIBS) - $(CC_LINK) -o kpropd $(SERVEROBJS) $(KRB5_BASE_LIBS) +kpropd: $(SERVEROBJS) $(KRB5_BASE_DEPLIBS) $(APPUTILS_DEPLIB) + $(CC_LINK) -o kpropd $(SERVEROBJS) $(KRB5_BASE_LIBS) $(APPUTILS_LIB) install:: for f in kprop kpropd; do \ diff --git a/src/util/ChangeLog b/src/util/ChangeLog index 0c1e44f21..7273cf5e4 100644 --- a/src/util/ChangeLog +++ b/src/util/ChangeLog @@ -1,3 +1,7 @@ +2004-02-24 Ken Raeburn + + * Makefile.in (MY_SUBDIRS): Build in apputils dir. + 2004-02-12 Tom Yu * Makefile.in (all-recurse): Remove exitsleep. diff --git a/src/util/Makefile.in b/src/util/Makefile.in index dc5d9ddce..d04f4217f 100644 --- a/src/util/Makefile.in +++ b/src/util/Makefile.in @@ -7,7 +7,7 @@ mydir=util ##WIN32### below in the 'all-windows' target anyways, so just hide this. ##WIN32##!if 0 MY_SUBDIRS=$(MAYBE_ET_@COM_ERR_VERSION@) $(MAYBE_SS_@SS_VERSION@) \ - profile pty $(MAYBE_DB_@DB_VERSION@) send-pr + profile pty $(MAYBE_DB_@DB_VERSION@) send-pr apputils ##WIN32##!endif BUILDTOP=$(REL).. diff --git a/src/util/apputils/ChangeLog b/src/util/apputils/ChangeLog new file mode 100644 index 000000000..68305d910 --- /dev/null +++ b/src/util/apputils/ChangeLog @@ -0,0 +1,6 @@ +2004-02-24 Ken Raeburn + + * New directory. + * Makefile.in, configure.in, dummy.c: New files. + * daemon.c: Moved here from lib/krb5/posix. + diff --git a/src/util/apputils/Makefile.in b/src/util/apputils/Makefile.in new file mode 100644 index 000000000..1509646ec --- /dev/null +++ b/src/util/apputils/Makefile.in @@ -0,0 +1,47 @@ +prefix=@prefix@ +bindir=@bindir@ +datadir=@datadir@ +mydatadir=$(datadir)/apputils +thisconfigdir=. +myfulldir=util/apputils +mydir=. +BUILDTOP=$(REL)..$(S).. +RELDIR=../util/apputils +SED = sed + +##DOS##BUILDTOP = ..\.. +##DOS##LIBNAME=$(OUTPRE)apputils.lib +##DOS##XTRA= +##DOS##OBJFILE=$(OUTPRE)apputils.lst + +# LIBOBJS may or may not contain daemon.o; dummy.o is just here to +# avoid having an empty library. +STLIBOBJS=dummy.o @LIBOBJS@ +STOBJLISTS=OBJS.ST +LIB=apputils + +all-unix:: all-liblinks +clean-unix:: clean-liblinks clean-libs clean-libobjs +install-unix:: install-libs + +LINTFLAGS=-uhvb +LINTFILES= daemon.c +LIBOBJS=$(OUTPRE)daemon.$(OBJEXT) + +SRCS= $(srcdir)/daemon.c \ + $(srcdir)/dummy.c + +# @lib_frag@ +# @libobj_frag@ + +# +++ Dependency line eater +++ +# +# Makefile dependencies follow. This must be the last section in +# the Makefile.in file +# +error_message.so error_message.po $(OUTPRE)error_message.$(OBJEXT): error_message.c com_err.h \ + error_table.h +et_name.so et_name.po $(OUTPRE)et_name.$(OBJEXT): et_name.c com_err.h error_table.h +init_et.so init_et.po $(OUTPRE)init_et.$(OBJEXT): init_et.c com_err.h error_table.h +com_err.so com_err.po $(OUTPRE)com_err.$(OBJEXT): com_err.c com_err.h error_table.h + diff --git a/src/util/apputils/configure.in b/src/util/apputils/configure.in new file mode 100644 index 000000000..efc4fcb75 --- /dev/null +++ b/src/util/apputils/configure.in @@ -0,0 +1,6 @@ +AC_INIT(daemon.c) +CONFIG_RULES +AC_REPLACE_FUNCS(daemon) +KRB5_BUILD_LIBRARY_STATIC +KRB5_BUILD_LIBOBJS +V5_AC_OUTPUT_MAKEFILE diff --git a/src/lib/krb5/posix/daemon.c b/src/util/apputils/daemon.c similarity index 100% rename from src/lib/krb5/posix/daemon.c rename to src/util/apputils/daemon.c diff --git a/src/util/apputils/dummy.c b/src/util/apputils/dummy.c new file mode 100644 index 000000000..d5b6cc08d --- /dev/null +++ b/src/util/apputils/dummy.c @@ -0,0 +1 @@ +int lib_server_dummy = 0; -- 2.26.2