]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
start: Remove outdated comment about group dropping
authorFilip Schauer <f.schauer@proxmox.com>
Mon, 15 Dec 2025 14:59:31 +0000 (15:59 +0100)
committerFiliprogrammer <44641787+Filiprogrammer@users.noreply.github.com>
Mon, 15 Dec 2025 19:27:28 +0000 (20:27 +0100)
Commit b58214ac30bd (tree-wide: improve setgroups() dropping) moved the
group dropping code to occur before lxc_switch_uid_gid. Therefore this
comment is no longer correct.

Signed-off-by: Filip Schauer <f.schauer@proxmox.com>
src/lxc/start.c

index 9311d61452a80e32e3b0dc5bc6f4b062596e1dca..4927faf9528ea353d0b37a8e2039697744b05372 100644 (file)
@@ -1307,9 +1307,6 @@ static int do_start(void *data)
                if (!handler->conf->root_nsgid_map)
                        nsgid = handler->conf->init_gid;
 
-               /* Drop groups only after we switched to a valid gid in the new
-                * user namespace.
-                */
                if (!lxc_drop_groups() &&
                    (handler->am_root || errno != EPERM))
                        goto out_warn_father;