[python2] aa-logprof: AppArmorBug: Passed unknown object to NetworkRule: inet
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
AppArmor |
Fix Released
|
Undecided
|
Christian Boltz | ||
2.10 |
Fix Released
|
Undecided
|
Christian Boltz |
Bug Description
This is on Scientific Linux 7.1 (RHEL clone).
Compiled from Apparmor 2.10.0 release.
It seems to me that logprof cannot handle the "inet" keyword
used in several of the (abstraction) profiles.
aa-logprof consistently crashes with this message.
# aa-logprof
Traceback (most recent call last):
File "/usr/sbin/
apparmor.
File "/usr/lib/
load_
File "/usr/lib/
incdata = parse_profile_
File "/usr/lib/
load_
File "/usr/lib/
incdata = parse_profile_
File "/usr/lib/
profile_
File "/usr/lib/
rule = cls._parse(
File "/usr/lib/
audit=audit, deny=deny, allow_keyword=
File "/usr/lib/
raise AppArmorBug('Passed unknown object to NetworkRule: %s' % str(domain))
AppArmorBug: Passed unknown object to NetworkRule: inet
An unexpected error occoured!
summary: |
- aa-logprof: AppArmorBug: Passed unknown object to NetworkRule: inet + [python2] aa-logprof: AppArmorBug: Passed unknown object to NetworkRule: + inet |
Changed in apparmor: | |
status: | Fix Committed → Fix Released |
This is a known problem with python2 - workaround: use python3 ;-)
To get it working with python3, /usr/bin/ python3
export PYTHON=
and then compile everything again (run configure; make; make install for libapparmor and the utils).
You'll probably also need to change the shebang line of aa-* to python3 - the fastest way to do this is
for file in utils/aa-* ; do
sed -i '1s,^#! /usr/bin/env python$,#! /usr/bin/env python3,' "$file"
done
That said: We are thinking about dropping support for python2, which would mean supporting only python3. Would this be ok for you, or do you have a good reason for using python 2 (except "it's the default")? ;-)