mirror of
https://github.com/monitoring-plugins/monitoring-plugins.git
synced 2026-02-20 00:10:09 -05:00
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
This commit is contained in:
parent
b2363e2914
commit
a22fb2e364
1 changed files with 4 additions and 6 deletions
|
|
@ -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; \
|
||||
|
|
|
|||
Loading…
Reference in a new issue