[5/6] nagios-plugins: Set SUID bit for plugins which need it to function properly

Message ID 423afb1f-304d-eecf-8db3-3ea5d9353fb8@ipfire.org
State Accepted
Commit b6e3a3eec9e0848b339bbe60ad475ff9f583aed3
Headers
Series Patchset for fixing errors surfaced in Core Update 157 (testing) |

Commit Message

Peter Müller May 21, 2021, 1:42 p.m. UTC
  Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
---
 lfs/nagios-plugins | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
  

Patch

diff --git a/lfs/nagios-plugins b/lfs/nagios-plugins
index d35a94bbe..cdf1910b0 100644
--- a/lfs/nagios-plugins
+++ b/lfs/nagios-plugins
@@ -32,7 +32,7 @@  DL_FROM    = $(URL_IPFIRE)
 DIR_APP    = $(DIR_SRC)/$(THISAPP)
 TARGET     = $(DIR_INFO)/$(THISAPP)
 PROG       = nagios-plugins
-PAK_VER    = 5
+PAK_VER    = 6
 
 DEPS       =
 
@@ -92,4 +92,11 @@  $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
 	# Prevent Nagios plugins from being owned (and hence writeable) by "nobody"
 	chown root:root -R /usr/lib/nagios/plugins
 
+	# Unfortunately, some of these plugins need the SUID bit to do their work properly
+	chmod +s \
+		/usr/lib/nagios/plugins/check_dhcp \
+		/usr/lib/nagios/plugins/check_icmp \
+		/usr/lib/nagios/plugins/check_ide_smart \
+		/usr/lib/nagios/plugins/check_ping
+
 	@$(POSTBUILD)