lxc-test-apparmor-mount revision 42e5c9878f0d20b3e9682ef441afed2f0228b298
2693N/A# apparmor_mount: test proper handling of apparmor in kernels 2693N/A# These require the ubuntu lxc package to be installed. 2693N/A# This program is free software; you can redistribute it and/or 2693N/A# modify it under the terms of the GNU Lesser General Public 2693N/A# License as published by the Free Software Foundation; either 2693N/A# version 2.1 of the License, or (at your option) any later version. 2693N/A# This library is distributed in the hope that it will be useful, 2693N/A# but WITHOUT ANY WARRANTY; without even the implied warranty of 2693N/A# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2693N/A# Lesser General Public License for more details. 2693N/A# You should have received a copy of the GNU Lesser General Public 2693N/A# License along with this library; if not, write to the Free Software 2693N/A# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 2693N/A# This test assumes an Ubuntu host 2693N/A# Only run on a normally configured ubuntu lxc system 2693N/A echo "lxcbr0 is not configured." 2693N/A echo "ERROR: Must run as root." 2693N/A# This would be much simpler if we could run it as 2693N/A# root. However, in order to not have the bind mount 2693N/A# of an empty directory over the securitfs 'mount' directory 2693N/A# be removed, we need to do this as non-root. 2693N/Alxc.id_map = u 0 910000 9999 2693N/Alxc.id_map = g 0 910000 9999 2693N/Aecho "test default confined container" 2693N/Aecho "test regular unconfined container" 6271N/Aecho "test default confined container" 6271N/A echo "FAIL: confined container started without mount restrictions" 6271N/Aecho "test regular unconfined container" 6271N/A echo "FAIL: unconfined container failed to start without mount restrictions" 2693N/A echo "FAIL: excepted container failed to start without mount restrictions"