diff options
| author | neilbrown <neilbrown> | 2005-12-20 04:12:42 +0000 |
|---|---|---|
| committer | neilbrown <neilbrown> | 2005-12-20 04:12:42 +0000 |
| commit | ac5b03be829b4c9369ebfb07a688308721103228 (patch) | |
| tree | 90fd0ee1a8e08c241bf3fd0d54690b888e4b5926 /utils | |
| parent | 371ca25167a217d647971384c37aa3fcee8a4aef (diff) | |
| download | nfs-utils-ac5b03be829b4c9369ebfb07a688308721103228.tar.gz nfs-utils-ac5b03be829b4c9369ebfb07a688308721103228.tar.xz nfs-utils-ac5b03be829b4c9369ebfb07a688308721103228.zip | |
Autogen update
Diffstat (limited to 'utils')
43 files changed, 763 insertions, 33 deletions
diff --git a/utils/Makefile.am b/utils/Makefile.am new file mode 100644 index 0000000..79f1270 --- /dev/null +++ b/utils/Makefile.am @@ -0,0 +1,28 @@ +## Process this file with automake to produce Makefile.in + +OPTDIRS = + +if CONFIG_RQUOTAD +OPTDIRS += rquotad +endif + +if CONFIG_NFSV4 +OPTDIRS += idmapd +endif + +if CONFIG_GSS +OPTDIRS += gssd svcgssd +endif + +SUBDIRS = \ + exportfs \ + lockd \ + mountd \ + nfsd \ + nfsstat \ + nhfsstone \ + showmount \ + statd \ + $(OPTDIRS) + +MAINTAINERCLEANFILES = Makefile.in diff --git a/utils/exportfs/Makefile.am b/utils/exportfs/Makefile.am new file mode 100644 index 0000000..d0226fc --- /dev/null +++ b/utils/exportfs/Makefile.am @@ -0,0 +1,15 @@ +## Process this file with automake to produce Makefile.in + +man5_MANS = exports.man +man7_MANS = nfsd.man +man8_MANS = exportfs.man + +EXTRA_DIST = $(man5_MANS) $(man7_MANS) $(man8_MANS) +sbin_PROGRAMS = exportfs +exportfs_SOURCES = exportfs.c +exportfs_LDADD = ../../support/export/libexport.a \ + ../../support/nfs/libnfs.a \ + ../../support/misc/libmisc.a \ + $(LIBWRAP) $(LIBNSL) + +MAINTAINERCLEANFILES = Makefile.in diff --git a/utils/exportfs/exportfs.c b/utils/exportfs/exportfs.c index c7a9a0e..c3ba997 100644 --- a/utils/exportfs/exportfs.c +++ b/utils/exportfs/exportfs.c @@ -8,7 +8,9 @@ * Extensive changes, 1999, Neil Brown <neilb@cse.unsw.edu.au> */ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif #include <stdlib.h> #include <string.h> diff --git a/utils/gssd/Makefile.am b/utils/gssd/Makefile.am new file mode 100644 index 0000000..6b01a72 --- /dev/null +++ b/utils/gssd/Makefile.am @@ -0,0 +1,83 @@ +## Process this file with automake to produce Makefile.in + +man8_MANS = gssd.man + +RPCPREFIX = rpc. +KPREFIX = @kprefix@ +sbin_PROGRAMS = gssd + +EXTRA_DIST = \ + $(man8_MANS) \ + gss_clnt_send_err.c \ + gss_destroy_creds + +gssd_SOURCES = \ + context.c \ + context_heimdal.c \ + err_util.c \ + gss_oids.c \ + gss_util.c \ + gssd.c \ + gssd_main_loop.c \ + gssd_proc.c \ + krb5_util.c \ + \ + context.h \ + err_util.h \ + gss_oids.h \ + gss_util.h \ + gssd.h \ + krb5_util.h \ + write_bytes.h + +gssd_LDADD = -lrpcsecgss -lgssapi -ldl $(KRBLIBS) +gssd_LDFLAGS = -Wl,-rpath=$(KRBDIR)/lib + +gssd_CPPFLAGS = -I$(top_srcdir)/support/rpc/include \ + $(AM_CPPFLAGS) $(CPPFLAGS) + +gssd_CFLAGS = $(AM_CFLAGS) $(CFLAGS) \ + $(KRBCFLAGS) + +MAINTAINERCLEANFILES = Makefile.in + +####################################################################### +# The following allows the current practice of having +# daemons renamed during the install to include RPCPREFIX +# and the KPREFIX +# This could all be done much easier with program_transform_name +# ( program_transform_name = s/^/$(RPCPREFIX)$(KPREFIX)/ ) +# but that also renames the man pages, which the current +# practice does not do. +install-exec-hook: + (cd $(DESTDIR)$(sbindir) && \ + for p in $(sbin_PROGRAMS); do \ + mv -f $$p$(EXEEXT) $(RPCPREFIX)$(KPREFIX)$$p$(EXEEXT) ;\ + done) +uninstall-hook: + (cd $(DESTDIR)$(sbindir) && \ + for p in $(sbin_PROGRAMS); do \ + rm -f $(RPCPREFIX)$(KPREFIX)$$p$(EXEEXT) ;\ + done) + + +# XXX This makes some assumptions about what automake does. +# XXX But there is no install-man-hook or install-man-local. +install-man: install-man8 install-man-links +uninstall-man: uninstall-man8 uninstall-man-links + +install-man-links: + (cd $(DESTDIR)$(man8dir) && \ + for m in $(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS); do \ + inst=`echo $$m | sed -e 's/man$$/8/'`; \ + rm -f $(RPCPREFIX)$$inst ; \ + $(LN_S) $$inst $(RPCPREFIX)$$inst ; \ + done) + +uninstall-man-links: + (cd $(DESTDIR)$(man8dir) && \ + for m in $(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS); do \ + inst=`echo $$m | sed -e 's/man$$/8/'`; \ + rm -f $(RPCPREFIX)$$inst ; \ + done) + diff --git a/utils/idmapd/Makefile.am b/utils/idmapd/Makefile.am new file mode 100644 index 0000000..586ac9a --- /dev/null +++ b/utils/idmapd/Makefile.am @@ -0,0 +1,70 @@ +## Process this file with automake to produce Makefile.in + +man5_MANS = idmapd.conf.man +man8_MANS = idmapd.man + +RPCPREFIX = rpc. +KPREFIX = @kprefix@ +sbin_PROGRAMS = idmapd + +EXTRA_DIST = \ + $(man5_MANS) \ + $(man8_MANS) \ + idmapd.conf + +idmapd_SOURCES = \ + atomicio.c \ + cfg.c \ + idmapd.c \ + setproctitle.c \ + strlcat.c \ + strlcpy.c \ + \ + cfg.h \ + nfs_idmap.h \ + queue.h + +idmapd_LDADD = -levent -lnfsidmap ../../support/nfs/libnfs.a + +MAINTAINERCLEANFILES = Makefile.in + +####################################################################### +# The following allows the current practice of having +# daemons renamed during the install to include RPCPREFIX +# and the KPREFIX +# This could all be done much easier with program_transform_name +# ( program_transform_name = s/^/$(RPCPREFIX)$(KPREFIX)/ ) +# but that also renames the man pages, which the current +# practice does not do. +install-exec-hook: + (cd $(DESTDIR)$(sbindir) && \ + for p in $(sbin_PROGRAMS); do \ + mv -f $$p$(EXEEXT) $(RPCPREFIX)$(KPREFIX)$$p$(EXEEXT) ;\ + done) +uninstall-hook: + (cd $(DESTDIR)$(sbindir) && \ + for p in $(sbin_PROGRAMS); do \ + rm -f $(RPCPREFIX)$(KPREFIX)$$p$(EXEEXT) ;\ + done) + + +# XXX This makes some assumptions about what automake does. +# XXX But there is no install-man-hook or install-man-local. +install-man: install-man5 install-man8 install-man-links +uninstall-man: uninstall-man5 uninstall-man8 uninstall-man-links + +install-man-links: + (cd $(DESTDIR)$(man8dir) && \ + for m in $(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS); do \ + inst=`echo $$m | sed -e 's/man$$/8/'`; \ + rm -f $(RPCPREFIX)$$inst ; \ + $(LN_S) $$inst $(RPCPREFIX)$$inst ; \ + done) + +uninstall-man-links: + (cd $(DESTDIR)$(man8dir) && \ + for m in $(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS); do \ + inst=`echo $$m | sed -e 's/man$$/8/'`; \ + rm -f $(RPCPREFIX)$$inst ; \ + done) + diff --git a/utils/lockd/Makefile.am b/utils/lockd/Makefile.am new file mode 100644 index 0000000..e1546a4 --- /dev/null +++ b/utils/lockd/Makefile.am @@ -0,0 +1,55 @@ +## Process this file with automake to produce Makefile.in + +man8_MANS = lockd.man +EXTRA_DIST = $(man8_MANS) + +RPCPREFIX = rpc. +KPREFIX = @kprefix@ +sbin_PROGRAMS = lockd +lockd_SOURCES = lockd.c +lockd_LDADD = ../../support/export/libexport.a \ + ../../support/nfs/libnfs.a \ + ../../support/misc/libmisc.a + +MAINTAINERCLEANFILES = Makefile.in + +####################################################################### +# The following allows the current practice of having +# daemons renamed during the install to include RPCPREFIX +# and the KPREFIX +# This could all be done much easier with program_transform_name +# ( program_transform_name = s/^/$(RPCPREFIX)$(KPREFIX)/ ) +# but that also renames the man pages, which the current +# practice does not do. +install-exec-hook: + (cd $(DESTDIR)$(sbindir) && \ + for p in $(sbin_PROGRAMS); do \ + mv -f $$p$(EXEEXT) $(RPCPREFIX)$(KPREFIX)$$p$(EXEEXT) ;\ + done) +uninstall-hook: + (cd $(DESTDIR)$(sbindir) && \ + for p in $(sbin_PROGRAMS); do \ + rm -f $(RPCPREFIX)$(KPREFIX)$$p$(EXEEXT) ;\ + done) + + +# XXX This makes some assumptions about what automake does. +# XXX But there is no install-man-hook or install-man-local. +install-man: install-man8 install-man-links +uninstall-man: uninstall-man8 uninstall-man-links + +install-man-links: + (cd $(DESTDIR)$(man8dir) && \ + for m in $(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS); do \ + inst=`echo $$m | sed -e 's/man$$/8/'`; \ + rm -f $(RPCPREFIX)$$inst ; \ + $(LN_S) $$inst $(RPCPREFIX)$$inst ; \ + done) + +uninstall-man-links: + (cd $(DESTDIR)$(man8dir) && \ + for m in $(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS); do \ + inst=`echo $$m | sed -e 's/man$$/8/'`; \ + rm -f $(RPCPREFIX)$$inst ; \ + done) + diff --git a/utils/lockd/lockd.c b/utils/lockd/lockd.c index 49183d2..71b31b0 100644 --- a/utils/lockd/lockd.c +++ b/utils/lockd/lockd.c @@ -6,13 +6,17 @@ * */ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif #include <stdio.h> #include <unistd.h> #include <string.h> #include <errno.h> -#include "nfslib.h" +#include <nfslib.h> + + static void usage(const char *); @@ -23,7 +27,7 @@ main(int argc, char **argv) if (argc > 1) usage (argv [0]); - + if (chdir(NFS_STATEDIR)) { fprintf(stderr, "%s: chdir(%s) failed: %s\n", argv [0], NFS_STATEDIR, strerror(errno)); diff --git a/utils/mountd/Makefile.am b/utils/mountd/Makefile.am new file mode 100644 index 0000000..dd400fd --- /dev/null +++ b/utils/mountd/Makefile.am @@ -0,0 +1,61 @@ +## Process this file with automake to produce Makefile.in + +man8_MANS = mountd.man +EXTRA_DIST = $(man8_MANS) + +RPCPREFIX = rpc. +KPREFIX = @kprefix@ +sbin_PROGRAMS = mountd + +mountd_SOURCES = mountd.c mount_dispatch.c auth.c rmtab.c cache.c \ + svc_run.c mountd.h +mountd_LDADD = ../../support/export/libexport.a \ + ../../support/nfs/libnfs.a \ + ../../support/misc/libmisc.a \ + $(LIBBSD) $(LIBWRAP) $(LIBNSL) +mountd_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS) \ + -I$(top_builddir)/support/include \ + -I$(top_srcdir)/support/export + +MAINTAINERCLEANFILES = Makefile.in + +####################################################################### +# The following allows the current practice of having +# daemons renamed during the install to include RPCPREFIX +# and the KPREFIX +# This could all be done much easier with program_transform_name +# ( program_transform_name = s/^/$(RPCPREFIX)$(KPREFIX)/ ) +# but that also renames the man pages, which the current +# practice does not do. +install-exec-hook: + (cd $(DESTDIR)$(sbindir) && \ + for p in $(sbin_PROGRAMS); do \ + mv -f $$p$(EXEEXT) $(RPCPREFIX)$(KPREFIX)$$p$(EXEEXT) ;\ + done) +uninstall-hook: + (cd $(DESTDIR)$(sbindir) && \ + for p in $(sbin_PROGRAMS); do \ + rm -f $(RPCPREFIX)$(KPREFIX)$$p$(EXEEXT) ;\ + done) + + +# XXX This makes some assumptions about what automake does. +# XXX But there is no install-man-hook or install-man-local. +install-man: install-man8 install-man-links +uninstall-man: uninstall-man8 uninstall-man-links + +install-man-links: + (cd $(DESTDIR)$(man8dir) && \ + for m in $(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS); do \ + inst=`echo $$m | sed -e 's/man$$/8/'`; \ + rm -f $(RPCPREFIX)$$inst ; \ + $(LN_S) $$inst $(RPCPREFIX)$$inst ; \ + done) + +uninstall-man-links: + (cd $(DESTDIR)$(man8dir) && \ + for m in $(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS); do \ + inst=`echo $$m | sed -e 's/man$$/8/'`; \ + rm -f $(RPCPREFIX)$$inst ; \ + done) + diff --git a/utils/mountd/auth.c b/utils/mountd/auth.c index 4e1cdbd..44d9980 100644 --- a/utils/mountd/auth.c +++ b/utils/mountd/auth.c @@ -6,7 +6,9 @@ * Copyright (C) 1995, 1996 Olaf Kirch <okir@monad.swb.de> */ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif #include <sys/stat.h> #include <netinet/in.h> diff --git a/utils/mountd/cache.c b/utils/mountd/cache.c index 34f949c..5285e10 100644 --- a/utils/mountd/cache.c +++ b/utils/mountd/cache.c @@ -6,7 +6,10 @@ * and listen for requests (using my_svc_run) * */ -#include "config.h" + +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif #include <sys/types.h> #include <sys/select.h> diff --git a/utils/mountd/mount_dispatch.c b/utils/mountd/mount_dispatch.c index e87831a..f00c0c5 100644 --- a/utils/mountd/mount_dispatch.c +++ b/utils/mountd/mount_dispatch.c @@ -4,7 +4,9 @@ * Copyright (C) 1995 Olaf Kirch <okir@monad.swb.de> */ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif #ifdef HAVE_TCP_WRAPPER #include "tcpwrapper.h" diff --git a/utils/mountd/mount_xdr.c b/utils/mountd/mount_xdr.c index 87adfa6..a0fefcb 100644 --- a/utils/mountd/mount_xdr.c +++ b/utils/mountd/mount_xdr.c @@ -4,9 +4,11 @@ * Originally generated by rpcgen; edited to get rid of warnings. */ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif -#include "mount.h" +#include <mount.h> inline bool_t xdr_fhandle(XDR *xdrs, fhandle objp) diff --git a/utils/mountd/mountd.c b/utils/mountd/mountd.c index 8a2f413..9cf2a1f 100644 --- a/utils/mountd/mountd.c +++ b/utils/mountd/mountd.c @@ -6,7 +6,9 @@ * Copyright (C) 1995, 1996 Olaf Kirch <okir@monad.swb.de> */ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif #include <signal.h> #include <sys/stat.h> diff --git a/utils/mountd/rmtab.c b/utils/mountd/rmtab.c index 90fbef4..f641a96 100644 --- a/utils/mountd/rmtab.c +++ b/utils/mountd/rmtab.c @@ -6,7 +6,9 @@ * Copyright (C) 1995, 1996 Olaf Kirch <okir@monad.swb.de> */ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif #include <sys/types.h> #include <sys/stat.h> diff --git a/utils/mountd/svc_run.c b/utils/mountd/svc_run.c index a1ef74a..7a8a595 100644 --- a/utils/mountd/svc_run.c +++ b/utils/mountd/svc_run.c @@ -43,7 +43,11 @@ * This is the RPC server side idle loop. * Wait for input, call server program. */ -#include "config.h" + +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <sys/types.h> #include <rpc/rpc.h> #include "xlog.h" diff --git a/utils/nfsd/Makefile.am b/utils/nfsd/Makefile.am new file mode 100644 index 0000000..445e3fd --- /dev/null +++ b/utils/nfsd/Makefile.am @@ -0,0 +1,56 @@ +## Process this file with automake to produce Makefile.in + +man8_MANS = nfsd.man +EXTRA_DIST = $(man8_MANS) + +RPCPREFIX = rpc. +KPREFIX = @kprefix@ +sbin_PROGRAMS = nfsd + +nfsd_SOURCES = nfsd.c +nfsd_LDADD = ../../support/export/libexport.a \ + ../../support/nfs/libnfs.a \ + ../../support/misc/libmisc.a + +MAINTAINERCLEANFILES = Makefile.in + +####################################################################### +# The following allows the current practice of having +# daemons renamed during the install to include RPCPREFIX +# and the KPREFIX +# This could all be done much easier with program_transform_name +# ( program_transform_name = s/^/$(RPCPREFIX)$(KPREFIX)/ ) +# but that also renames the man pages, which the current +# practice does not do. +install-exec-hook: + (cd $(DESTDIR)$(sbindir) && \ + for p in $(sbin_PROGRAMS); do \ + mv -f $$p$(EXEEXT) $(RPCPREFIX)$(KPREFIX)$$p$(EXEEXT) ;\ + done) +uninstall-hook: + (cd $(DESTDIR)$(sbindir) && \ + for p in $(sbin_PROGRAMS); do \ + rm -f $(RPCPREFIX)$(KPREFIX)$$p$(EXEEXT) ;\ + done) + + +# XXX This makes some assumptions about what automake does. +# XXX But there is no install-man-hook or install-man-local. +install-man: install-man8 install-man-links +uninstall-man: uninstall-man8 uninstall-man-links + +install-man-links: + (cd $(DESTDIR)$(man8dir) && \ + for m in $(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS); do \ + inst=`echo $$m | sed -e 's/man$$/8/'`; \ + rm -f $(RPCPREFIX)$$inst ; \ + $(LN_S) $$inst $(RPCPREFIX)$$inst ; \ + done) + +uninstall-man-links: + (cd $(DESTDIR)$(man8dir) && \ + for m in $(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS); do \ + inst=`echo $$m | sed -e 's/man$$/8/'`; \ + rm -f $(RPCPREFIX)$$inst ; \ + done) + diff --git a/utils/nfsd/nfsd.c b/utils/nfsd/nfsd.c index 78143ed..05506ee 100644 --- a/utils/nfsd/nfsd.c +++ b/utils/nfsd/nfsd.c @@ -7,7 +7,9 @@ * Copyright (C) 1995, 1996 Olaf Kirch <okir@monad.swb.de> */ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif #include <stdio.h> #include <stdlib.h> diff --git a/utils/nfsstat/Makefile.am b/utils/nfsstat/Makefile.am new file mode 100644 index 0000000..becb108 --- /dev/null +++ b/utils/nfsstat/Makefile.am @@ -0,0 +1,12 @@ +## Process this file with automake to produce Makefile.in + +man8_MANS = nfsstat.man +EXTRA_DIST = $(man8_MANS) + +sbin_PROGRAMS = nfsstat +nfsstat_SOURCES = nfsstat.c +nfsstat_LDADD = ../../support/export/libexport.a \ + ../../support/nfs/libnfs.a \ + ../../support/misc/libmisc.a + +MAINTAINERCLEANFILES = Makefile.in diff --git a/utils/nfsstat/nfsstat.c b/utils/nfsstat/nfsstat.c index 613e53a..4b45c46 100644 --- a/utils/nfsstat/nfsstat.c +++ b/utils/nfsstat/nfsstat.c @@ -4,7 +4,9 @@ * Copyright (C) 1995-2005 Olaf Kirch <okir@suse.de> */ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif #define NFSSVCSTAT "/proc/net/rpc/nfsd" #define NFSCLTSTAT "/proc/net/rpc/nfs" diff --git a/utils/nhfsstone/Makefile.am b/utils/nhfsstone/Makefile.am new file mode 100644 index 0000000..43e9fda --- /dev/null +++ b/utils/nhfsstone/Makefile.am @@ -0,0 +1,14 @@ +## Process this file with automake to produce Makefile.in + +man8_MANS = nhfsstone.man nhfsrun.man nhfsnums.man nhfsgraph.man +EXTRA_DIST = $(man8_MANS) DISCLAIMER README.linux + +dist_sbin_SCRIPTS = nhfsrun nhfsnums nhfsgraph + +sbin_PROGRAMS = nhfsstone +nhfsstone_SOURCES = nhfsstone.c +nhfsstone_LDADD = ../../support/export/libexport.a \ + ../../support/nfs/libnfs.a \ + ../../support/misc/libmisc.a + +MAINTAINERCLEANFILES = Makefile.in diff --git a/utils/rquotad/Makefile.am b/utils/rquotad/Makefile.am new file mode 100644 index 0000000..b478fad --- /dev/null +++ b/utils/rquotad/Makefile.am @@ -0,0 +1,61 @@ +## Process this file with automake to produce Makefile.in + +man8_MANS = rquotad.man + +RPCPREFIX = rpc. +KPREFIX = @kprefix@ +sbin_PROGRAMS = rquotad + +EXTRA_DIST = rquota.x $(man8_MANS) NEW README.okir + +rquotad_SOURCES = rquota_server.c rquota_svc.c rquota_xdr.c quotactl.c \ + hasquota.c mntent.h pathnames.h rquota.h +rquotad_LDADD = ../../support/export/libexport.a \ + ../../support/nfs/libnfs.a \ + ../../support/misc/libmisc.a \ + $(LIBBSD) $(LIBWRAP) $(LIBNSL) +rquotad_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS) \ + -I$(top_srcdir)/support/export + +MAINTAINERCLEANFILES = Makefile.in + +####################################################################### +# The following allows the current practice of having +# daemons renamed during the install to include RPCPREFIX +# and the KPREFIX +# This could all be done much easier with program_transform_name +# ( program_transform_name = s/^/$(RPCPREFIX)$(KPREFIX)/ ) +# but that also renames the man pages, which the current +# practice does not do. +install-exec-hook: + (cd $(DESTDIR)$(sbindir) && \ + for p in $(sbin_PROGRAMS); do \ + mv -f $$p$(EXEEXT) $(RPCPREFIX)$(KPREFIX)$$p$(EXEEXT) ;\ + done) +uninstall-hook: + (cd $(DESTDIR)$(sbindir) && \ + for p in $(sbin_PROGRAMS); do \ + rm -f $(RPCPREFIX)$(KPREFIX)$$p$(EXEEXT) ;\ + done) + + +# XXX This makes some assumptions about what automake does. +# XXX But there is no install-man-hook or install-man-local. +install-man: install-man8 install-man-links +uninstall-man: uninstall-man8 uninstall-man-links + +install-man-links: + (cd $(DESTDIR)$(man8dir) && \ + for m in $(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS); do \ + inst=`echo $$m | sed -e 's/man$$/8/'`; \ + rm -f $(RPCPREFIX)$$inst ; \ + $(LN_S) $$inst $(RPCPREFIX)$$inst ; \ + done) + +uninstall-man-links: + (cd $(DESTDIR)$(man8dir) && \ + for m in $(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS); do \ + inst=`echo $$m | sed -e 's/man$$/8/'`; \ + rm -f $(RPCPREFIX)$$inst ; \ + done) + diff --git a/utils/rquotad/hasquota.c b/utils/rquotad/hasquota.c index f93e90a..d2d8115 100644 --- a/utils/rquotad/hasquota.c +++ b/utils/rquotad/hasquota.c @@ -19,7 +19,10 @@ * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ -#include "config.h" + +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif #define _LINUX_QUOTA_VERSION 1 #include <sys/types.h> diff --git a/utils/rquotad/quotactl.c b/utils/rquotad/quotactl.c index 30e68a4..8966335 100644 --- a/utils/rquotad/quotactl.c +++ b/utils/rquotad/quotactl.c @@ -18,7 +18,10 @@ * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ -#include "config.h" + +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif #include <sys/types.h> #include <unistd.h> diff --git a/utils/rquotad/rquota_server.c b/utils/rquotad/rquota_server.c index 45f351f..32e5cba 100644 --- a/utils/rquotad/rquota_server.c +++ b/utils/rquotad/rquota_server.c @@ -18,7 +18,10 @@ * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ -#include "config.h" + +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif #define _LINUX_QUOTA_VERSION 1 #include <rpc/rpc.h> diff --git a/utils/rquotad/rquota_svc.c b/utils/rquotad/rquota_svc.c index 1d07c1c..0785551 100644 --- a/utils/rquotad/rquota_svc.c +++ b/utils/rquotad/rquota_svc.c @@ -18,7 +18,10 @@ * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ -#include "config.h" + +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif #ifdef HAVE_TCP_WRAPPER #include "tcpwrapper.h" diff --git a/utils/rquotad/rquota_xdr.c b/utils/rquotad/rquota_xdr.c index 6e68bd4..46eb1e1 100644 --- a/utils/rquotad/rquota_xdr.c +++ b/utils/rquotad/rquota_xdr.c @@ -1,4 +1,6 @@ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif #include <rpc/rpc.h> #include "rquota.h" diff --git a/utils/showmount/Makefile.am b/utils/showmount/Makefile.am new file mode 100644 index 0000000..077b2c7 --- /dev/null +++ b/utils/showmount/Makefile.am @@ -0,0 +1,14 @@ +## Process this file with automake to produce Makefile.in + +man8_MANS = showmount.man +EXTRA_DIST = $(man8_MANS) + +sbin_PROGRAMS = showmount +showmount_SOURCES = showmount.c +showmount_LDADD = ../../support/export/libexport.a \ + ../../support/nfs/libnfs.a \ + ../../support/misc/libmisc.a +showmount_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS) \ + -I$(top_builddir)/support/export + +MAINTAINERCLEANFILES = Makefile.in diff --git a/utils/showmount/showmount.c b/utils/showmount/showmount.c index 92c6ef9..8fb58a2 100644 --- a/utils/showmount/showmount.c +++ b/utils/showmount/showmount.c @@ -13,7 +13,9 @@ * GNU General Public License for more details. */ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif #include <stdio.h> #include <rpc/rpc.h> diff --git a/utils/statd/Makefile.am b/utils/statd/Makefile.am new file mode 100644 index 0000000..26800ea --- /dev/null +++ b/utils/statd/Makefile.am @@ -0,0 +1,91 @@ +## Process this file with automake to produce Makefile.in + +man8_MANS = statd.man + +RPCGEN = $(top_builddir)/tools/rpcgen/rpcgen + +GENFILES_CLNT = sm_inter_clnt.c +GENFILES_SVC = sm_inter_svc.c +GENFILES_XDR = sm_inter_xdr.c +GENFILES_H = sm_inter.h + +GENFILES = $(GENFILES_CLNT) $(GENFILES_SVC) $(GENFILES_XDR) $(GENFILES_H) + +RPCPREFIX = rpc. +KPREFIX = @kprefix@ +sbin_PROGRAMS = statd +statd_SOURCES = callback.c notlist.c log.c misc.c monitor.c notify.c \ + simu.c stat.c statd.c state.c svc_run.c rmtcall.c \ + sm_inter_clnt.c sm_inter_svc.c sm_inter_xdr.c log.h \ + notlist.h statd.h system.h version.h sm_inter.h +BUILT_SOURCES = $(GENFILES) +statd_LDADD = ../../support/export/libexport.a \ + ../../support/nfs/libnfs.a \ + ../../support/misc/libmisc.a \ + $(LIBWRAP) $(LIBNSL) + +EXTRA_DIST = sim_sm_inter.x sm_inter.x $(man8_MANS) COPYRIGHT simulate.c + +$(RPCGEN): + make -C ../../tools/rpcgen all + +$(GENFILES_CLNT): %_clnt.c: %.x $(RPCGEN) + test -f $@ && rm -rf $@ || true + $(RPCGEN) -l -o $@ $< + +$(GENFILES_SVC): %_svc.c: %.x $(RPCGEN) + test -f $@ && rm -rf $@ || true + $(RPCGEN) -m -o $@ $< + +$(GENFILES_XDR): %_xdr.c: %.x $(RPCGEN) + test -f $@ && rm -rf $@ || true + $(RPCGEN) -c -o $@ $< + +$(GENFILES_H): %.h: %.x $(RPCGEN) + test -f $@ && rm -rf $@ || true + $(RPCGEN) -h -o $@ $< + +MAINTAINERCLEANFILES = Makefile.in + +CLEANFILES = $(GENFILES) + +####################################################################### +# The following allows the current practice of having +# daemons renamed during the install to include RPCPREFIX +# and the KPREFIX +# This could all be done much easier with program_transform_name +# ( program_transform_name = s/^/$(RPCPREFIX)$(KPREFIX)/ ) +# but that also renames the man pages, which the current +# practice does not do. +install-exec-hook: + (cd $(DESTDIR)$(sbindir) && \ + for p in $(sbin_PROGRAMS); do \ + mv -f $$p$(EXEEXT) $(RPCPREFIX)$(KPREFIX)$$p$(EXEEXT) ;\ + done) +uninstall-hook: + (cd $(DESTDIR)$(sbindir) && \ + for p in $(sbin_PROGRAMS); do \ + rm -f $(RPCPREFIX)$(KPREFIX)$$p$(EXEEXT) ;\ + done) + + +# XXX This makes some assumptions about what automake does. +# XXX But there is no install-man-hook or install-man-local. +install-man: install-man8 install-man-links +uninstall-man: uninstall-man8 uninstall-man-links + +install-man-links: + (cd $(DESTDIR)$(man8dir) && \ + for m in $(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS); do \ + inst=`echo $$m | sed -e 's/man$$/8/'`; \ + rm -f $(RPCPREFIX)$$inst ; \ + $(LN_S) $$inst $(RPCPREFIX)$$inst ; \ + done) + +uninstall-man-links: + (cd $(DESTDIR)$(man8dir) && \ + for m in $(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS); do \ + inst=`echo $$m | sed -e 's/man$$/8/'`; \ + rm -f $(RPCPREFIX)$$inst ; \ + done) + diff --git a/utils/statd/callback.c b/utils/statd/callback.c index 0947727..8a85ce9 100644 --- a/utils/statd/callback.c +++ b/utils/statd/callback.c @@ -6,7 +6,9 @@ * NSM for Linux. */ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif #include "statd.h" #include "notlist.h" diff --git a/utils/statd/log.c b/utils/statd/log.c index 008f036..408807e 100644 --- a/utils/statd/log.c +++ b/utils/statd/log.c @@ -12,7 +12,9 @@ * 260295 okir started with simply syslog logging. */ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif #include <syslog.h> #include <unistd.h> diff --git a/utils/statd/misc.c b/utils/statd/misc.c index a3752bb..fd201b4 100644 --- a/utils/statd/misc.c +++ b/utils/statd/misc.c @@ -6,7 +6,9 @@ * NSM for Linux. */ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif #include <errno.h> #include <limits.h> diff --git a/utils/statd/monitor.c b/utils/statd/monitor.c index 40e8f49..8348473 100644 --- a/utils/statd/monitor.c +++ b/utils/statd/monitor.c @@ -7,7 +7,9 @@ * NSM for Linux. */ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif #include <fcntl.h> #include <limits.h> diff --git a/utils/statd/notify.c b/utils/statd/notify.c index ffe2da6..d7aa1dd 100644 --- a/utils/statd/notify.c +++ b/utils/statd/notify.c @@ -10,7 +10,9 @@ * NSM notify list handling. */ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif #include <dirent.h> #include <errno.h> diff --git a/utils/statd/notlist.c b/utils/statd/notlist.c index 0ef5491..4f52b1d 100644 --- a/utils/statd/notlist.c +++ b/utils/statd/notlist.c @@ -12,7 +12,9 @@ * Simple list management for notify list */ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif #include <string.h> #include "misc.h" diff --git a/utils/statd/rmtcall.c b/utils/statd/rmtcall.c index a45705b..809d1ad 100644 --- a/utils/statd/rmtcall.c +++ b/utils/statd/rmtcall.c @@ -20,7 +20,9 @@ * it won't if it's worth its money). */ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif #include <sys/types.h> #include <sys/socket.h> diff --git a/utils/statd/simu.c b/utils/statd/simu.c index 78a6ee2..9d685ad 100644 --- a/utils/statd/simu.c +++ b/utils/statd/simu.c @@ -4,7 +4,10 @@ * NSM for Linux. */ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include "statd.h" #include "notlist.h" diff --git a/utils/statd/stat.c b/utils/statd/stat.c index 7d9d1b1..bcd3550 100644 --- a/utils/statd/stat.c +++ b/utils/statd/stat.c @@ -5,7 +5,10 @@ * NSM for Linux. */ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <netdb.h> #include "statd.h" diff --git a/utils/statd/statd.c b/utils/statd/statd.c index f61914d..8ebb808 100644 --- a/utils/statd/statd.c +++ b/utils/statd/statd.c @@ -7,7 +7,11 @@ * NSM for Linux. */ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + +#include <sys/stat.h> #include <limits.h> #include <signal.h> #include <unistd.h> diff --git a/utils/statd/statd.h b/utils/statd/statd.h index d9d5d3d..225cc8b 100644 --- a/utils/statd/statd.h +++ b/utils/statd/statd.h @@ -5,7 +5,10 @@ * NSM for Linux. */ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include "sm_inter.h" #include "system.h" #include "log.h" diff --git a/utils/statd/state.c b/utils/statd/state.c index c241985..a6a4077 100644 --- a/utils/statd/state.c +++ b/utils/statd/state.c @@ -6,7 +6,10 @@ * NSM for Linux. */ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <dirent.h> #include <errno.h> #include <fcntl.h> diff --git a/utils/statd/svc_run.c b/utils/statd/svc_run.c index 597b68d..67bb05c 100644 --- a/utils/statd/svc_run.c +++ b/utils/statd/svc_run.c @@ -47,7 +47,11 @@ * This is the RPC server side idle loop. * Wait for input, call server program. */ -#include "config.h" + +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <errno.h> #include <time.h> #include "statd.h" diff --git a/utils/svcgssd/Makefile.am b/utils/svcgssd/Makefile.am new file mode 100644 index 0000000..4c0a0f8 --- /dev/null +++ b/utils/svcgssd/Makefile.am @@ -0,0 +1,93 @@ +## Process this file with automake to produce Makefile.in + +LINKSRCS = \ + err_util.c \ + gss_util.c \ + gss_oids.c \ + context.c \ + context_heimdal.c + +man8_MANS = svcgssd.man + +RPCPREFIX = rpc. +KPREFIX = @kprefix@ +sbin_PROGRAMS = svcgssd + +EXTRA_DIST = $(man8_MANS) + +svcgssd_SOURCES = \ + cacheio.c \ + svcgssd.c \ + svcgssd_main_loop.c \ + svcgssd_mech2file.c \ + svcgssd_proc.c \ + $(LINKSRCS) \ + cacheio.h \ + svcgssd.h + +svcgssd_LDADD = \ + ../../support/nfs/libnfs.a \ + -lrpcsecgss -lgssapi -lnfsidmap \ + -ldl $(KRBLIBS) + +svcgssd_LDFLAGS = -Wl,-rpath=$(KRBDIR)/lib + +svcgssd_CPPFLAGS = -I$(top_srcdir)/support/rpc/include \ + $(AM_CPPFLAGS) $(CPPFLAGS) \ + -I$(top_srcdir)/utils/gssd + +svcgssd_CFLAGS = $(AM_CFLAGS) $(CFLAGS) \ + $(KRBCFLAGS) + +BUILT_SOURCES = $(LINKSRCS) + +MAINTAINERCLEANFILES = Makefile.in + +CLEANFILES = $(LINKSRCS) + +LINKDIR = $(top_srcdir)/utils/gssd + +$(LINKSRCS): %: + ln -sf $(LINKDIR)/$@ $@ + +####################################################################### +# The following allows the current practice of having +# daemons renamed during the install to include RPCPREFIX +# and the KPREFIX +# This could all be done much easier with program_transform_name +# ( program_transform_name = s/^/$(RPCPREFIX)$(KPREFIX)/ ) +# but that also renames the man pages, which the current +# practice does not do. +####################################################################### +install-exec-hook: + (cd $(DESTDIR)$(sbindir) && \ + for p in $(sbin_PROGRAMS); do \ + mv -f $$p$(EXEEXT) $(RPCPREFIX)$(KPREFIX)$$p$(EXEEXT) ;\ + done) +uninstall-hook: + (cd $(DESTDIR)$(sbindir) && \ + for p in $(sbin_PROGRAMS); do \ + rm -f $(RPCPREFIX)$(KPREFIX)$$p$(EXEEXT) ;\ + done) + + +# XXX This makes some assumptions about what automake does. +# XXX But there is no install-man-hook or install-man-local. +install-man: install-man8 install-man-links +uninstall-man: uninstall-man8 uninstall-man-links + +install-man-links: + (cd $(DESTDIR)$(man8dir) && \ + for m in $(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS); do \ + inst=`echo $$m | sed -e 's/man$$/8/'`; \ + rm -f $(RPCPREFIX)$$inst ; \ + $(LN_S) $$inst $(RPCPREFIX)$$inst ; \ + done) + +uninstall-man-links: + (cd $(DESTDIR)$(man8dir) && \ + for m in $(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS); do \ + inst=`echo $$m | sed -e 's/man$$/8/'`; \ + rm -f $(RPCPREFIX)$$inst ; \ + done) + |
