]> git.ipfire.org Git - pakfire.git/commitdiff
jail: Don't fail if we cannot enable accounting
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 14 Dec 2024 14:25:44 +0000 (14:25 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 14 Dec 2024 14:25:44 +0000 (14:25 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/jail.c

index 46a47311f68d4549a9c0d9e25ba2b34ee7c93f49..3aaa6888c840b416ad0165edc06ec866795a3855 100644 (file)
@@ -1514,8 +1514,16 @@ static int __pakfire_jail_exec(struct pakfire_jail* jail,
 
                // Enable accounting to collect stats
                r = pakfire_cgroup_enable_accounting(ctx.cgroup);
-               if (r < 0)
-                       goto ERROR;
+               if (r < 0) {
+                       switch (-r) {
+                               case ENOTSUP:
+                                       DEBUG(jail->ctx, "Could not enable accounting in cgroup\n");
+                                       break;
+
+                               default:
+                                       goto ERROR;
+                       }
+               }
 
                // Clone into this cgroup
                args.cgroup = pakfire_cgroup_fd(ctx.cgroup);