summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTon Voon <tonvoon@users.sourceforge.net>2006-06-07 07:59:32 (GMT)
committerTon Voon <tonvoon@users.sourceforge.net>2006-06-07 07:59:32 (GMT)
commita22fb2e364fcce8e46dd34488924997b73015c85 (patch)
treec753f578fba9d6540a11699f397ffd4a07d168cc
parentb2363e2914cd798f5fa230b31902da906795c9d6 (diff)
downloadmonitoring-plugins-a22fb2e364fcce8e46dd34488924997b73015c85.tar.gz
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
-rw-r--r--plugins-root/Makefile.am10
1 files changed, 4 insertions, 6 deletions
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
9DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@ 9DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
10LIBS = @LIBINTL@ @LIBS@ @SSLLIBS@ 10LIBS = @LIBINTL@ @LIBS@ @SSLLIBS@
11 11
12libexec_PROGRAMS = check_dhcp check_icmp @EXTRAS_ROOT@ 12noinst_PROGRAMS = check_dhcp check_icmp @EXTRAS_ROOT@
13 13
14EXTRA_PROGRAMS = pst3 14EXTRA_PROGRAMS = pst3
15 15
@@ -28,12 +28,10 @@ test:
28 28
29setuid_root_mode = 4550 29setuid_root_mode = 4550
30 30
31group = nagios
32
33# /* Author Coreutils team - see ACKNOWLEDGEMENTS */ 31# /* Author Coreutils team - see ACKNOWLEDGEMENTS */
34 32
35INSTALL_SUID = \ 33INSTALL_SUID = \
36 for f in $(libexec_PROGRAMS) ; do \ 34 for f in $(noinst_PROGRAMS) ; do \
37 p=$$f; \ 35 p=$$f; \
38 echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(libexecdir)/$$p"; \ 36 echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(libexecdir)/$$p"; \
39 $(INSTALL_PROGRAM) $$p $(DESTDIR)$(libexecdir)/$$p; \ 37 $(INSTALL_PROGRAM) $$p $(DESTDIR)$(libexecdir)/$$p; \
@@ -43,10 +41,10 @@ INSTALL_SUID = \
43 chmod $(setuid_root_mode) $(DESTDIR)$(libexecdir)/$$p; \ 41 chmod $(setuid_root_mode) $(DESTDIR)$(libexecdir)/$$p; \
44 done 42 done
45 43
46install-root: $(libexec_PROGRAMS) 44install-root: $(noinst_PROGRAMS)
47 @$(INSTALL_SUID) 45 @$(INSTALL_SUID)
48 46
49install-exec-local: $(libexec_PROGRAMS) 47install-exec-local: $(noinst_PROGRAMS)
50 @TMPFILE=$(DESTDIR)$(libexecdir)/.setuid-$$$$; \ 48 @TMPFILE=$(DESTDIR)$(libexecdir)/.setuid-$$$$; \
51 rm -f $$TMPFILE; \ 49 rm -f $$TMPFILE; \
52 echo > $$TMPFILE; \ 50 echo > $$TMPFILE; \