nixos-container: runInContainer to enter all namespaces

for compatibility with nspawn --private-users=
This commit is contained in:
Jean-Baptiste Giraudeau 2024-12-06 10:18:35 +01:00
parent c8f83ec641
commit a0d86441b5
No known key found for this signature in database
GPG Key ID: 7CEF8C9CC2D9933B

View File

@ -364,7 +364,7 @@ sub restartContainer {
sub runInContainer {
my @args = @_;
my $leader = getLeader;
exec($nsenter, "-t", $leader, "-m", "-u", "-i", "-n", "-p", "--", @args);
exec($nsenter, "--all", "-t", $leader, "--", @args);
die "cannot run nsenter: $!\n";
}