lxc-test-{unpriv,usernic.in}: make sure to chgrp as well

These tests are failing on new kernels because the container root is
not privileged over the directories, since privilege no requires
the group being mapped into the container.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
This commit is contained in:
Serge Hallyn 2014-07-17 16:02:06 -05:00
parent 16a410466e
commit 79d88b03ed
2 changed files with 6 additions and 6 deletions

View File

@ -84,10 +84,10 @@ lxc.network.link = lxcbr0
lxc.id_map = u 0 910000 9999
lxc.id_map = g 0 910000 9999
EOF
chown -R $TUSER $HDIR
chown -R $TUSER: $HDIR
mkdir -p /run/user/$(id -u $TUSER)
chown -R $TUSER /run/user/$(id -u $TUSER)
chown -R $TUSER: /run/user/$(id -u $TUSER)
cd $HDIR
@ -108,7 +108,7 @@ if [ -e /sys/fs/cgroup/cgmanager/sock ]; then
else
for d in /sys/fs/cgroup/*; do
[ ! -d $d/lxctest ] && mkdir $d/lxctest
chown -R $TUSER $d/lxctest
chown -R $TUSER: $d/lxctest
echo $$ > $d/lxctest/tasks
done
fi

View File

@ -74,7 +74,7 @@ trap cleanup EXIT SIGHUP SIGINT SIGTERM
deluser usernic-user || true
useradd usernic-user
sudo mkdir -p /home/usernic-user
sudo chown usernic-user /home/usernic-user
sudo chown usernic-user: /home/usernic-user
usermod -v 910000-919999 -w 910000-919999 usernic-user
mkdir -p /home/usernic-user/.config/lxc/
@ -101,13 +101,13 @@ if [ -e /sys/fs/cgroup/cgmanager/sock ]; then
else
for d in /sys/fs/cgroup/*; do
[ ! -d $d/lxctest ] && mkdir $d/lxctest
chown -R usernic-user $d/lxctest
chown -R usernic-user: $d/lxctest
echo $$ > $d/lxctest/tasks
done
fi
mkdir -p /run/user/$(id -u usernic-user)
chown -R usernic-user /run/user/$(id -u usernic-user) /home/usernic-user
chown -R usernic-user: /run/user/$(id -u usernic-user) /home/usernic-user
# Create two test bridges
brctl addbr usernic-br0