summary refs log tree commit diff
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2022-01-27 15:55:59 +0100
committerLeah Neukirchen <leah@vuxu.org>2022-01-27 15:55:59 +0100
commit8f8929ce425236543b003d181e7c811245087821 (patch)
tree1f9a08a0d372fa9c9539763779d133b02183dc82
parent7eb994a38ee5b34fc2a1221a9ecb20d9183a56e9 (diff)
downloadrvnit-8f8929ce425236543b003d181e7c811245087821.tar.gz
rvnit-8f8929ce425236543b003d181e7c811245087821.tar.xz
rvnit-8f8929ce425236543b003d181e7c811245087821.zip
pid1: ensure PATH default value
-rw-r--r--rvnit.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/rvnit.c b/rvnit.c
index 26b1446..8175b35 100644
--- a/rvnit.c
+++ b/rvnit.c
@@ -634,8 +634,10 @@ main(int argc, char *argv[])
 	}
 
 	pid1 = (getpid() == 1);
-	if (pid1)
+	if (pid1) {
+		setenv("PATH", "/usr/bin:/usr/sbin", 0);
 		own_console();
+	}
 
 	pipe(selflogfd);
 	fcntl(selflogfd[0], F_SETFL, O_NONBLOCK);