mirror of
https://git.proxmox.com/git/dab
synced 2025-10-04 06:12:31 +00:00
preliminary unprivileged support
just added the more straight-forward things, albeit userid mappings might mess with file owner in the tar assembled at the end? Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
37c10e648a
commit
3f9c3b5025
@ -311,14 +311,20 @@ sub __sample_config {
|
|||||||
|
|
||||||
if ($ostype =~ m/^de(bi|vu)an-/) {
|
if ($ostype =~ m/^de(bi|vu)an-/) {
|
||||||
$data .= "lxc.include = /usr/share/lxc/config/debian.common.conf\n";
|
$data .= "lxc.include = /usr/share/lxc/config/debian.common.conf\n";
|
||||||
|
$data .= "lxc.include = /usr/share/lxc/config/debian.userns.conf\n" if $> != 0;
|
||||||
} elsif ($ostype =~ m/^ubuntu-/) {
|
} elsif ($ostype =~ m/^ubuntu-/) {
|
||||||
$data .= "lxc.include = /usr/share/lxc/config/ubuntu.common.conf\n";
|
$data .= "lxc.include = /usr/share/lxc/config/ubuntu.common.conf\n";
|
||||||
|
$data .= "lxc.include = /usr/share/lxc/config/ubuntu.userns.conf\n" if $> != 0;
|
||||||
} else {
|
} else {
|
||||||
die "unknown os type '$ostype'\n";
|
die "unknown os type '$ostype'\n";
|
||||||
}
|
}
|
||||||
|
if ($> != 0) {
|
||||||
|
$data .= "lxc.idmap = u 0 100000 65536\n";
|
||||||
|
$data .= "lxc.idmap = g 0 100000 65536\n";
|
||||||
|
}
|
||||||
$data .= "lxc.uts.name = localhost\n";
|
$data .= "lxc.uts.name = localhost\n";
|
||||||
$data .= "lxc.rootfs.path = $self->{rootfs}\n";
|
$data .= "lxc.rootfs.path = $self->{rootfs}\n";
|
||||||
|
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user