I just re-tested this with the new python utils (inherit cat, child profile for rm, allow everything). The result was a nice backtrace when permissions were added to the "rm" child profile:
[...]
Profile: /home/cb/linuxtag/apparmor/scripts/hello^/usr/bin/rm
Path: /home/sys-tmp/hello.txt
Mode: w
Severity: 6
[1 - /home/sys-tmp/hello.txt]
2 - /home/*/hello.txt
[(A)llow] / (D)eny / (I)gnore / (G)lob / Glob with (E)xtension / (N)ew / Abo(r)t / (F)inish / (M)ore
[pressed 'a']
Adding /home/sys-tmp/hello.txt w to profile
Traceback (most recent call last):
File "aa-genprof", line 160, in <module>
lp_ret = apparmor.do_logprof_pass(logmark, passno)
File "/home/cb/apparmor/HEAD-CLEAN/utils/apparmor/aa.py", line 2291, in do_logprof_pass
save_profiles()
File "/home/cb/apparmor/HEAD-CLEAN/utils/apparmor/aa.py", line 2309, in save_profiles
for prof_name in changed.keys():
RuntimeError: dictionary changed size during iteration
I just re-tested this with the new python utils (inherit cat, child profile for rm, allow everything). The result was a nice backtrace when permissions were added to the "rm" child profile:
[...] linuxtag/ apparmor/ scripts/ hello^/ usr/bin/ rm tmp/hello. txt
Profile: /home/cb/
Path: /home/sys-
Mode: w
Severity: 6
[1 - /home/sys- tmp/hello. txt] tmp/hello. txt w to profile do_logprof_ pass(logmark, passno) cb/apparmor/ HEAD-CLEAN/ utils/apparmor/ aa.py", line 2291, in do_logprof_pass cb/apparmor/ HEAD-CLEAN/ utils/apparmor/ aa.py", line 2309, in save_profiles
2 - /home/*/hello.txt
[(A)llow] / (D)eny / (I)gnore / (G)lob / Glob with (E)xtension / (N)ew / Abo(r)t / (F)inish / (M)ore
[pressed 'a']
Adding /home/sys-
Traceback (most recent call last):
File "aa-genprof", line 160, in <module>
lp_ret = apparmor.
File "/home/
save_profiles()
File "/home/
for prof_name in changed.keys():
RuntimeError: dictionary changed size during iteration