]> git.ipfire.org Git - people/ms/pakfire.git/commitdiff
jail: Log the mountpoints when entering the inner namespaces
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 5 Nov 2023 18:39:39 +0000 (18:39 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 5 Nov 2023 18:39:39 +0000 (18:39 +0000)
There is only little sense in logging the mount table of the host system
as it only makes the debug log very noisy.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/jail.c

index d9b8cd7a688c42edc168cc44050a985a80e667ec..595e269dfb8579892ebf7a5085deff85b8c4a2ca 100644 (file)
@@ -1473,9 +1473,6 @@ static int pakfire_jail_mount(struct pakfire_jail* jail, struct pakfire_jail_exe
                        return r;
        }
 
-       // Log all mountpoints
-       pakfire_mount_list(jail->ctx);
-
        return 0;
 }
 
@@ -1797,6 +1794,9 @@ static int pakfire_jail_child2(struct pakfire_jail* jail,
        DEBUG(jail->pakfire, "  UID: %u (effective %u)\n", uid, euid);
        DEBUG(jail->pakfire, "  GID: %u (effective %u)\n", gid, egid);
 
+       // Log all mountpoints
+       pakfire_mount_list(jail->ctx);
+
        // Fail if we are not PID 1
        if (pid != 1) {
                CTX_ERROR(jail->ctx, "Child process is not PID 1\n");