Bug#878233: check_running_kernel: find: ‘/boot/efi’: Permission denied

2018-03-09 Thread Felix Geyer
Control: tags -1 patch

On Wed, 11 Oct 2017 13:15:12 +0200 Stefan Wendler  
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


Bug#878233: check_running_kernel: find: ‘/boot/efi’: Permission denied

2017-10-11 Thread Stefan Wendler
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


-- System Information:
Debian Release: 9.2
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.9.0-1-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

nagios-plugins-contrib depends on no packages.

Versions of packages nagios-plugins-contrib recommends:
ii  bind9-host1:9.10.3.dfsg.P4-12.3+deb9u3
ii  binutils  2.28-5
pn  freeipmi-tools
ii  libc6 2.24-11+deb9u1
pn  libdata-validate-domain-perl  
pn  libdata-validate-ip-perl  
pn  libdate-manip-perl
pn  libdbd-mysql-perl 
pn  libio-socket-ssl-perl 
ii  libipc-run-perl   0.94-1
ii  liblocale-gettext-perl1.07-3+b1
pn  liblwp-useragent-determined-perl  
pn  libmail-imapclient-perl   
pn  libmemcached11
pn  libmemcachedutil2 
ii  libmonitoring-plugin-perl 0.39-1
pn  libnet-cups-perl  
pn  libnet-dns-perl   
pn  libnet-dns-sec-perl   
pn  libnet-smtp-ssl-perl  
pn  libnet-smtp-tls-perl  
pn  libnet-smtpauth-perl  
ii  libnet-snmp-perl  6.0.1-2
pn  libnet-ssleay-perl
pn  libreadonly-perl  
pn  libredis-perl 
ii  libtimedate-perl  2.3000-2
pn  libvarnishapi1
pn  libwebinject-perl 
pn  libxml-simple-perl
pn  libyaml-syck-perl 
ii  lsof  4.89+dfsg-0.1
pn  nagios-plugins-basic  
ii  openssl   1.1.0f-3
ii  perl  5.24.1-3+deb9u2
ii  perl-base [libsocket-perl]5.24.1-3+deb9u2
ii  python2.7.13-2
pn  python-pymongo
pn  ruby | ruby-interpreter   
ii  snmp  5.7.3+dfsg-1.7
pn  whois 

Versions of packages nagios-plugins-contrib suggests:
pn  backuppc   
pn  cciss-vol-status   
pn  expect 
pn  libsys-virt-perl   
pn  moreutils  
pn  mpt-status 
pn  nagios-plugin-check-multi  
pn  percona-toolkit
pn  perl-doc   
ii  python2.7  2.7.13-2
pn  smstools   

-- no debconf information