Control: tags -1 patch

On Wed, 11 Oct 2017 13:15:12 +0200 Stefan Wendler <stefan.wend...@tngtech.com> 
wrote:
> Package: nagios-plugins-contrib
> Version: 21.20170222
> Severity: normal
> 
> Dear Maintainer,
> 
>    * What led up to the situation?
> running 'check_running_kernel' as nagios-user
>    * What was the outcome of this action?
> find: ‘/boot/efi’: Permission denied
>    * What outcome did you expect instead?
> Does /boot/efi have to be read? If not, please exclude reading the /boot/efi 
> directory

The same thing happens when /boot is an own filesystem and /boot/lost+found is 
only root readable.

Adding a -maxdepth 1 to the offending find calls does the trick.
A patch is attached.

Felix

-- 
Felix Geyer
Berater
Tel.:   +49 2166 9901-0
Fax:    +49 2166 9901-100
E-
Mail: felix.ge...@credativ.de
PGP:    D1DF 8149 7643 8822 7283 92DC 1004
DA1C FF6D B892
https://www.credativ.de
-- 
Felix Geyer
Berater
Tel.:   +49 2166 9901-125
Fax:    +49 2166 9901-100
E-
Mail: felix.ge...@credativ.de
PGP:    D1DF 8149 7643 8822 7283 92DC 1004
DA1C FF6D B892
https://www.credativ.de

credativ GmbH, HRB Mönchengladbach 12080
USt-ID-Nummer: DE204566209
Trompeterallee 108, 41189 Mönchengladbach
Geschäftsführung: Dr. Michael Meskes, Jörg Folz, Sascha Heuer

**********************************************
Jetzt neu:
Elephant Shed - PostgreSQL Appliance
PostgreSQL und alles was dazugehört

Von Backup über Monitoring bis Reporting:
https://elephant-shed.io/de/
**********************************************
--- a/debian/patches/dsa/check_running_kernel_jessie_centos_fix
+++ b/debian/patches/dsa/check_running_kernel_jessie_centos_fix
@@ -19,8 +19,8 @@
 -	"/boot/vmlinuz-`uname -r`"\
 -	"/boot/vmlinux-`uname -r`"\
 -	"/boot/kfreebsd-`uname -r`.gz"; do
-+	$([ -f "/boot/vmlinuz-$(uname -r)" ] && find /boot/ -name 'vmlinuz*' -and -name "vmlinuz-$(uname -r)" -or -name 'vmlinuz*' -and -newer "/boot/vmlinuz-$(uname -r)" | sort) \
-+	$([ -f "/boot/kfreebsd-$(uname -r).gz" ] && find /boot/ -name 'kfreebsd*' -and -name "kfreebsd-$(uname -r).gz" -or -name 'kfreebsd*' -and -newer "/boot/kfreebsd-$(uname -r).gz" | sort); do
++	$([ -f "/boot/vmlinuz-$(uname -r)" ] && find /boot/ -maxdepth 1 -name 'vmlinuz*' -and -name "vmlinuz-$(uname -r)" -or -name 'vmlinuz*' -and -newer "/boot/vmlinuz-$(uname -r)" | sort) \
++	$([ -f "/boot/kfreebsd-$(uname -r).gz" ] && find /boot/ -maxdepth 1 -name 'kfreebsd*' -and -name "kfreebsd-$(uname -r).gz" -or -name 'kfreebsd*' -and -newer "/boot/kfreebsd-$(uname -r).gz" | sort); do
  
  	if [ -e "$on_disk" ]; then
  		if [ -z "$STRINGS" ]; then

Reply via email to