/usr/share/cgmanager/tests/test10.sh is in cgmanager-tests 0.24-0ubuntu5.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | #!/bin/bash
echo "test 10: unpriv movepid to chowned directory"
if [ -n "$SUDO_USER" ]; then
gid=$SUDO_GID
uid=$SUDO_UID
else
gid=1000
uid=1000
fi
sudo -u \#$uid sleep 200 &
pp=$!
sleep 1
p=`ps -ef | grep sleep | grep $pp | grep -v sudo | tail -1 | awk '{ print $2 }'`
sudo -u \#$uid dbus-send --print-reply --address=unix:path=/sys/fs/cgroup/cgmanager/sock --type=method_call /org/linuxcontainers/cgmanager org.linuxcontainers.cgmanager0_0.MovePid string:'memory' string:'zzz' int32:$p
if [ $? -ne 0 ]; then
kill -9 $pp $p
exit 1
fi
kill -9 $pp $p
exit 0
|