mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-05 10:17:23 +00:00
unpriv tests: also move caller into unbound cgroups
Otherwise the name=systemd cgroup isn't changed to one which the lxc-unpriv user can write to, causing the test to fail. This allows lxc-test-unpriv and lxc-test-usernic to pass when run in an unprivileged container with cgmanager. Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com> Acked-by: Stéphane Graber <stgraber@ubuntu.com>
This commit is contained in:
parent
df9b1831fb
commit
ef4deb7f20
@ -92,7 +92,7 @@ chown -R $TUSER /run/user/$(id -u $TUSER)
|
||||
cd $HDIR
|
||||
|
||||
if [ -e /sys/fs/cgroup/cgmanager/sock ]; then
|
||||
for d in $(grep -v ^# /proc/cgroups | awk '{print $1}'); do
|
||||
for d in $(cut -d : -f 2 /proc/self/cgroup); do
|
||||
dbus-send --print-reply --address=unix:path=/sys/fs/cgroup/cgmanager/sock \
|
||||
--type=method_call /org/linuxcontainers/cgmanager org.linuxcontainers.cgmanager0_0.Create \
|
||||
string:$d string:$TUSER >/dev/null
|
||||
|
@ -85,7 +85,7 @@ lxc.id_map = g 0 910000 10000
|
||||
EOF
|
||||
|
||||
if [ -e /sys/fs/cgroup/cgmanager/sock ]; then
|
||||
for d in $(grep -v ^# /proc/cgroups | awk '{print $1}'); do
|
||||
for d in $(cut -d : -f 2 /proc/self/cgroup); do
|
||||
dbus-send --print-reply --address=unix:path=/sys/fs/cgroup/cgmanager/sock \
|
||||
--type=method_call /org/linuxcontainers/cgmanager org.linuxcontainers.cgmanager0_0.Create \
|
||||
string:$d string:usernic-user >/dev/null
|
||||
|
Loading…
Reference in New Issue
Block a user