diff mbox series

[mickledore,24/24] busybox: Set PATH in syslog initscript

Message ID e9ca1405b732720ff72d379e0262a78bfd2e7d53.1697816789.git.steve@sakoman.com
State New
Headers show
Series [mickledore,01/24] cups: fix CVE-2023-4504 | expand

Commit Message

Steve Sakoman Oct. 20, 2023, 3:51 p.m. UTC
From: Martijn de Gouw <martijn.de.gouw@prodrive-technologies.com>

This script is not always called with /sbin and /usr/sbin in the PATH
already, for example when called via ssh. Explicitly set PATH to make
sure it includes /sbin and /usr/sbin since that's where start-stop-daemon
is located.

Signed-off-by: Martijn de Gouw <martijn.de.gouw@prodrive-technologies.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit fa53f898eaba15dff030f9eadf86e5bca7d954fa)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
---
 meta/recipes-core/busybox/files/syslog | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/meta/recipes-core/busybox/files/syslog b/meta/recipes-core/busybox/files/syslog
index 2208613e8c..a4fea30ab7 100644
--- a/meta/recipes-core/busybox/files/syslog
+++ b/meta/recipes-core/busybox/files/syslog
@@ -10,6 +10,8 @@ 
 
 set -e
 
+PATH="/bin:/usr/bin:/sbin:/usr/sbin"
+
 if [ -f /etc/syslog-startup.conf ]; then
 	. /etc/syslog-startup.conf
 	LOG_LOCAL=0