From 458592594e9a4a4da28133d593e47c4a2cc8f79b Mon Sep 17 00:00:00 2001 From: Solene Rapenne Date: Tue, 23 Feb 2021 23:24:12 +0100 Subject: [PATCH] Repair chroot, the only feature that isn't covered by tests --- main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main.c b/main.c index ead8d72..7c8682b 100644 --- a/main.c +++ b/main.c @@ -66,6 +66,9 @@ drop_privileges(const char *user, const char *path) errlog("dropping privileges to user %s (uid=%i) failed", user, pw->pw_uid); } + + /* base directory is now / */ + estrlcpy(chroot_dir, "/", sizeof(chroot_dir)); } #ifdef __OpenBSD__ /*