From 5135f8bff5d0dfa2ef3db198026772a19702549e Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Tue, 1 Nov 2022 21:59:19 +0100 Subject: [PATCH] common/common.c: chroot_start(): log entering chroot jail (or inability to do so) --- common/common.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/common/common.c b/common/common.c index 13b21d6a56..e7171d8fb0 100644 --- a/common/common.c +++ b/common/common.c @@ -307,11 +307,16 @@ void chroot_start(const char *path) if (chroot(path)) fatal_with_errno(EXIT_FAILURE, "chroot(%s)", path); +#else + upsdebugx(1, "Can not chroot into %s: not implemented on this platform", path); #endif + if (chdir("/")) fatal_with_errno(EXIT_FAILURE, "chdir(/)"); +#ifndef WIN32 upsdebugx(1, "chrooted into %s", path); +#endif } #ifdef WIN32