From f0e328edc93b6c449c0c4d9ecd8ba3ace18bfdca Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Tue, 5 Apr 2022 17:46:43 +0200 Subject: [PATCH] plugins: bootmisc: use relative symlink for /var/run In an upside world, much like the Finit test cases, the root may be relocated. This make /var/run relative to /var, instead of /. Which hopefully is safer and covers more use-cases. Signed-off-by: Joachim Wiberg --- plugins/bootmisc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/bootmisc.c b/plugins/bootmisc.c index 9262cfa0..8e15a923 100644 --- a/plugins/bootmisc.c +++ b/plugins/bootmisc.c @@ -135,7 +135,7 @@ static void setup(void *arg) ln("/dev/shm", "/run/shm"); /* compat only, should really be set up by OS/dist */ - ln("/run", "/var/run"); + ln("../run", "/var/run"); } else { makedir("/var/lock", 1777); makedir("/var/run", 0755);