File nagios-plugins-1.4.6-no_chown.patch of Package nagios-plugins
--- plugins-root/Makefile.am
+++ plugins-root/Makefile.am
@@ -36,7 +36,6 @@
echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(libexecdir)/$$p"; \
$(INSTALL_PROGRAM) $$p $(DESTDIR)$(libexecdir)/$$p; \
echo " chown root $(DESTDIR)$(libexecdir)/$$p"; \
- chown root $(DESTDIR)$(libexecdir)/$$p; \
echo " chmod $(setuid_root_mode) $(DESTDIR)$(libexecdir)/$$p"; \
chmod $(setuid_root_mode) $(DESTDIR)$(libexecdir)/$$p; \
done
@@ -55,11 +54,12 @@
&& chmod $(setuid_root_mode) $$TMPFILE > /dev/null 2>&1 \
&& can_create_suid_root_executable=yes; \
rm -f $$TMPFILE; \
- if test $$can_create_suid_root_executable = yes; then \
- $(INSTALL_SUID); \
+ $(INSTALL_SUID); \
+ if test $$can_create_suid_root_executable != yes; then \
else \
- echo "WARNING: insufficient access; not installing setuid plugins"; \
+ echo "WARNING: insufficient access; not installing plugins as setuid"; \
echo "NOTE: to install setuid plugins, run 'make install-root' as root"; \
+ echo "NOTE: or fix this in your packaging (like the specfile)"; \
fi
# /* Author Coreutils team sub-citation */
--- plugins-root/Makefile.in
+++ plugins-root/Makefile.in
@@ -366,7 +366,6 @@
echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(libexecdir)/$$p"; \
$(INSTALL_PROGRAM) $$p $(DESTDIR)$(libexecdir)/$$p; \
echo " chown root $(DESTDIR)$(libexecdir)/$$p"; \
- chown root $(DESTDIR)$(libexecdir)/$$p; \
echo " chmod $(setuid_root_mode) $(DESTDIR)$(libexecdir)/$$p"; \
chmod $(setuid_root_mode) $(DESTDIR)$(libexecdir)/$$p; \
done
@@ -729,11 +728,11 @@
&& chmod $(setuid_root_mode) $$TMPFILE > /dev/null 2>&1 \
&& can_create_suid_root_executable=yes; \
rm -f $$TMPFILE; \
- if test $$can_create_suid_root_executable = yes; then \
- $(INSTALL_SUID); \
- else \
- echo "WARNING: insufficient access; not installing setuid plugins"; \
+ $(INSTALL_SUID); \
+ if test $$can_create_suid_root_executable != yes; then \
+ echo "WARNING: insufficient access; not installing plugins as setuid"; \
echo "NOTE: to install setuid plugins, run 'make install-root' as root"; \
+ echo "NOTE: or fix this in your packaging (specfile or alike)"; \
fi
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.