Public bug reported:
Hello, aa-genprof doesn't run well within an lxd instance:
lxd init # if needed
...
lxc launch ubuntu:18.04
...
lxc exec something -- bash
apt-get install apparmor-utils
aa-genprof something
root@healthy-fly:~# aa-genprof nginx
Writing updated profile for /usr/sbin/nginx.
Setting /usr/sbin/nginx to complain mode.
Traceback (most recent call last):
File "/usr/sbin/aa-genprof", line 123, in <module>
sysctl_write(ratelimit_sysctl, 0)
File "/usr/sbin/aa-genprof", line 44, in sysctl_write
with open(path, 'w') as f_out:
PermissionError: [Errno 13] Permission denied:
'/proc/sys/kernel/printk_ratelimit'
An unexpected error occoured!
For details, see /tmp/apparmor-bugreport-1dp0cm5x.txt
Please consider reporting a bug at https://bugs.launchpad.net/apparmor/
and attach this file.
<pre>Traceback (most recent call last):
File "/usr/sbin/aa-genprof", line 123, in <module>
sysctl_write(ratelimit_sysctl, 0)
File "/usr/sbin/aa-genprof", line 44, in sysctl_write
with open(path, 'w') as f_out:
PermissionError: [Errno 13] Permission denied:
'/proc/sys/kernel/printk_ratelimit'
</pre>
Thanks
ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: apparmor-utils 2.12-4ubuntu5
ProcVersionSignature: Ubuntu 4.15.0-29.31-generic 4.15.18
Uname: Linux 4.15.0-29-generic x86_64
ApportVersion: 2.20.9-0ubuntu7.2
Architecture: amd64
Date: Sat Aug 4 12:01:07 2018
KernLog:
ProcEnviron:
TERM=rxvt-unicode-256color
PATH=(custom, no user)
LANG=C.UTF-8
ProcKernelCmdline: BOOT_IMAGE=/boot/vmlinuz-4.15.0-29-generic
root=UUID=7b8c2e1b-d2e6-47d9-9030-c078e9701a1d ro quiet splash
crashkernel=384M-2G:128M,2G-:256M crashkernel=384M-2G:128M,2G-:256M
crashkernel=384M-2G:128M,2G-:256M crashkernel=384M-2G:128M,2G-:256M vt.handoff=1
SourcePackage: apparmor
Syslog: Aug 4 11:39:33 healthy-fly dbus-daemon[196]: [system] AppArmor D-Bus
mediation is enabled
UpgradeStatus: No upgrade log present (probably fresh install)
** Affects: apparmor (Ubuntu)
Importance: Undecided
Status: New
** Tags: amd64 apport-bug bionic uec-images
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1785391
Title:
aa-genprof fails in an lxd instance
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apparmor/+bug/1785391/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs