From a22fb2e364fcce8e46dd34488924997b73015c85 Mon Sep 17 00:00:00 2001 From: Ton Voon Date: Wed, 7 Jun 2006 07:59:32 +0000 Subject: Do not install setuid programs unless run as root git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1416 f882894a-f735-0410-b71e-b25c423dba1c diff --git a/plugins-root/Makefile.am b/plugins-root/Makefile.am index f5ecc46..5a2af85 100644 --- a/plugins-root/Makefile.am +++ b/plugins-root/Makefile.am @@ -9,7 +9,7 @@ localedir = $(datadir)/locale DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@ LIBS = @LIBINTL@ @LIBS@ @SSLLIBS@ -libexec_PROGRAMS = check_dhcp check_icmp @EXTRAS_ROOT@ +noinst_PROGRAMS = check_dhcp check_icmp @EXTRAS_ROOT@ EXTRA_PROGRAMS = pst3 @@ -28,12 +28,10 @@ test: setuid_root_mode = 4550 -group = nagios - # /* Author Coreutils team - see ACKNOWLEDGEMENTS */ INSTALL_SUID = \ - for f in $(libexec_PROGRAMS) ; do \ + for f in $(noinst_PROGRAMS) ; do \ p=$$f; \ echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(libexecdir)/$$p"; \ $(INSTALL_PROGRAM) $$p $(DESTDIR)$(libexecdir)/$$p; \ @@ -43,10 +41,10 @@ INSTALL_SUID = \ chmod $(setuid_root_mode) $(DESTDIR)$(libexecdir)/$$p; \ done -install-root: $(libexec_PROGRAMS) +install-root: $(noinst_PROGRAMS) @$(INSTALL_SUID) -install-exec-local: $(libexec_PROGRAMS) +install-exec-local: $(noinst_PROGRAMS) @TMPFILE=$(DESTDIR)$(libexecdir)/.setuid-$$$$; \ rm -f $$TMPFILE; \ echo > $$TMPFILE; \ -- cgit v0.10-9-g596f