diff options
author | Ton Voon <tonvoon@users.sourceforge.net> | 2006-06-07 07:59:32 (GMT) |
---|---|---|
committer | Ton Voon <tonvoon@users.sourceforge.net> | 2006-06-07 07:59:32 (GMT) |
commit | a22fb2e364fcce8e46dd34488924997b73015c85 (patch) | |
tree | c753f578fba9d6540a11699f397ffd4a07d168cc | |
parent | b2363e2914cd798f5fa230b31902da906795c9d6 (diff) | |
download | monitoring-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.am | 10 |
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 | |||
9 | DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@ | 9 | DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@ |
10 | LIBS = @LIBINTL@ @LIBS@ @SSLLIBS@ | 10 | LIBS = @LIBINTL@ @LIBS@ @SSLLIBS@ |
11 | 11 | ||
12 | libexec_PROGRAMS = check_dhcp check_icmp @EXTRAS_ROOT@ | 12 | noinst_PROGRAMS = check_dhcp check_icmp @EXTRAS_ROOT@ |
13 | 13 | ||
14 | EXTRA_PROGRAMS = pst3 | 14 | EXTRA_PROGRAMS = pst3 |
15 | 15 | ||
@@ -28,12 +28,10 @@ test: | |||
28 | 28 | ||
29 | setuid_root_mode = 4550 | 29 | setuid_root_mode = 4550 |
30 | 30 | ||
31 | group = nagios | ||
32 | |||
33 | # /* Author Coreutils team - see ACKNOWLEDGEMENTS */ | 31 | # /* Author Coreutils team - see ACKNOWLEDGEMENTS */ |
34 | 32 | ||
35 | INSTALL_SUID = \ | 33 | INSTALL_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 | ||
46 | install-root: $(libexec_PROGRAMS) | 44 | install-root: $(noinst_PROGRAMS) |
47 | @$(INSTALL_SUID) | 45 | @$(INSTALL_SUID) |
48 | 46 | ||
49 | install-exec-local: $(libexec_PROGRAMS) | 47 | install-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; \ |