]> git.ipfire.org Git - pakfire.git/commitdiff
jail: Actually exit if something went wrong during initialization
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 5 Nov 2023 17:47:50 +0000 (17:47 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 5 Nov 2023 17:47:50 +0000 (17:47 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/jail.c

index acbf56454973a78b9960b7eff1363f5e679e81c2..ece668eca6a2e63e1c5163bee7e0ac30c3ef5e9b 100644 (file)
@@ -1819,13 +1819,13 @@ static int pakfire_jail_child2(struct pakfire_jail* jail,
        // Fail if we are not PID 1
        if (pid != 1) {
                CTX_ERROR(jail->ctx, "Child process is not PID 1\n");
-               //return 126;
+               return 126;
        }
 
        // Fail if we are not running as root
        if (uid || gid || euid || egid) {
                ERROR(jail->pakfire, "Child process is not running as root\n");
-               //return 126;
+               return 126;
        }
 
        const char* arch = pakfire_get_effective_arch(jail->pakfire);