2014-03-19 19:25:42 |
Tyler Hicks |
description |
The new aa.py module does not handle a bare capability rule and emits a traceback.
$ mkdir /tmp/profiles
$ printf "profile cap {\n capability,\n}" >/tmp/profiles/cap
$ sudo ./aa-enforce -d /tmp/profs /tmp/profs/cap
Traceback (most recent call last):
File "./aa-enforce", line 30, in <module>
tool.cmd_enforce()
File "/var/scm/apparmor.git/utils/apparmor/tools.py", line 153, in cmd_enforce
apparmor.read_profiles()
File "/var/scm/apparmor.git/utils/apparmor/aa.py", line 2558, in read_profiles
read_profile(profile_dir + '/' + file, True)
File "/var/scm/apparmor.git/utils/apparmor/aa.py", line 2584, in read_profile
profile_data = parse_profile_data(data, file, 0)
File "/var/scm/apparmor.git/utils/apparmor/aa.py", line 3031, in parse_profile_data
raise AppArmorException(_('Syntax Error: Unknown line found in file: %s line: %s') % (file, lineno + 1))
apparmor.common.AppArmorException: 'Syntax Error: Unknown line found in file: /tmp/profs/cap line: 2' |
The new aa.py module does not handle a bare capability rule and emits a traceback.
$ mkdir /tmp/profs
$ printf "profile cap {\n capability,\n}" >/tmp/profs/cap
$ sudo ./aa-enforce -d /tmp/profs /tmp/profs/cap
Traceback (most recent call last):
File "./aa-enforce", line 30, in <module>
tool.cmd_enforce()
File "/var/scm/apparmor.git/utils/apparmor/tools.py", line 153, in cmd_enforce
apparmor.read_profiles()
File "/var/scm/apparmor.git/utils/apparmor/aa.py", line 2558, in read_profiles
read_profile(profile_dir + '/' + file, True)
File "/var/scm/apparmor.git/utils/apparmor/aa.py", line 2584, in read_profile
profile_data = parse_profile_data(data, file, 0)
File "/var/scm/apparmor.git/utils/apparmor/aa.py", line 3031, in parse_profile_data
raise AppArmorException(_('Syntax Error: Unknown line found in file: %s line: %s') % (file, lineno + 1))
apparmor.common.AppArmorException: 'Syntax Error: Unknown line found in file: /tmp/profs/cap line: 2' |
|