]> git.ipfire.org Git - people/stevee/pakfire.git/commitdiff
pakfire: Run any jails unprivileged even when called as root
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 12 Aug 2022 17:56:39 +0000 (17:56 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 12 Aug 2022 17:56:39 +0000 (17:56 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/pakfire.c

index 272ca4ace193872b3aff46248a85155632b5f5d7..86b272f0b3adb2666b56907424c7aaa3a3c8a4e5 100644 (file)
@@ -702,7 +702,7 @@ PAKFIRE_EXPORT int pakfire_create(struct pakfire** pakfire, const char* path,
        }
 
        // Fetch sub UID/GIDs
-       if (p->uid) {
+       if (!pakfire_on_root(p)) {
                // UID
                r = pakfire_getsubuid(p, p->uid, &p->subuid);
                if (r) {