Package: needrestart Version: 3.4-5 Severity: normal
buster's behaviour, in terms of ENV setup differs, when one performs 'su -' versus 'su root'. Due to this, 'sbin' paths are not in a 'su root' $PATH. This means that this happens, when one does an apt-get upgrade as 'su root': Restarting services... invoke-rc.d ssh restart Can't exec "invoke-rc.d": No such file or directory at /usr/sbin/needrestart line 1081, <STDIN> line 11. As well, needrestart doesn't seem to notice the error, and simply presumes all went well. Of note is that apt-get is in a normal user's path. So someone with root privileges can still run it, even if 'sbin' deriviates aren't in the path. In as needrestart is run quite often from apt-get... this does seem to be an issue. In as needrestart doesn't flag the error, and also presents a lot of info to the user, the above error often 'flies' by on the terminal very fast. The result is that the end-user is left thinking that services have been restarted, when in fact needrestart did not succeed in doing so. More than anything, the lack of error catching is what concerns me. There are more reasons than just 'su - versus su root' where invoke-rc.d might fail, yet needrestart check for any return code, etc. -- Package-specific info: (nothing helpful shown) -- System Information: Debian Release: 10.7 APT prefers stable APT policy: (500, 'stable') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.19.0-13-amd64 (SMP w/4 CPU cores) Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: sysvinit (via /sbin/init) LSM: AppArmor: enabled Versions of packages needrestart depends on: ii binutils 2.31.1-16 ii dpkg 1.19.7 ii gettext-base 0.19.8.1-9 ii libintl-perl 1.26-2 ii libmodule-find-perl 0.13-1 ii libmodule-scandeps-perl 1.27-1 ii libproc-processtable-perl 0.56-1 ii libsort-naturally-perl 1.03-2 ii libterm-readkey-perl 2.38-1 ii perl 5.28.1-6+deb10u1 ii xz-utils 5.2.4-1 Versions of packages needrestart recommends: ii sysvinit-core 2.93-8 Versions of packages needrestart suggests: ii iucode-tool 2.3.1-1 ii libnotify-bin 0.7.7-4 -- no debconf information