Comment 8 for bug 1728130

Revision history for this message
Heather Lemon (hypothetical-lemon) wrote :

### VERIFICATION DONE FOCAL ###

sudo add-apt-repository ppa:apparmor-dev/mqueue-dev
sudo apt update

# exchange keypair ssh
scp linux-* ubuntu@x.x.x.x:~

sudo dpkg -i linux*
sudo apt --fix-broken install

# edit /etc/default/grub
GRUB_DEFAULT='Advanced options for Ubuntu>Ubuntu, with Linux 5.4.0-131-generic'
sudo update-grub

restart/reboot machine

sudo apt-get upgrade apparmor

# go find menu entry and update grub
/boot/boot.cfg
# menuentry 'Ubuntu, with Linux 5.4.0-131-generic'

# execute command
GRUB_DEFAULT='Advanced options for Ubuntu>Ubuntu, with Linux 5.4.0-131-generic'

# should output
supports mqueue

sudo apt install ubuntu-dev-tools -y

pull-ppa-source --ppa georgiag/mqueue-sru apparmor focal

sudo apt-get install autoconf libtool -y

cd ./libraries/libapparmor/

./autogen.sh

export PYTHONPATH=/tmp/apparmor-2.13.3/libraries/libapparmor/swig/python
export PYTHON=/usr/bin/python3
export PYTHON_VERSION=3
export PYTHON_VERSIONS=python3
export USE_SYSTEM=1 make

./configure

sudo apt-get install flex dejagnu

make

sudo make check

sudo make install

cd binutils
make
make check
make install

cd ./libraries/libapparmor
sh ./autogen.sh
sh ./configure
make
make check
make install

cd parser
$ make # depends on libapparmor having been built first
$ make check

# run unit tests
cd /tests/regession/apparmor/
sudo make tests

sudo su

echo "
abi <kernel>,
include <tunables/global>
/tmp/apparmor-2.13.3/tests/regression/apparmor/posix_mq_rcv {
  include <abstractions/base>
  /tmp/apparmor-2.13.3/tests/regression/apparmor/posix_mq_snd ux,
}
" | apparmor_parser -q -r

# run command
./posix_mq_rcv -c ./posix_mq_snd
FAIL - could not open mq: Permission denied
# we see this fail error

# make sure there is enough permissions to execute
sudo chmod 777 posix_mq_rcv

./posix_mq_rcv -c ./posix_mq_snd
PASS

### VERIFICATION DONE FOCAL ###