[apparmor] [patch] fix disabling printk_ratelimit in aa-genprof
Christian Boltz
apparmor at cboltz.de
Mon Jun 9 19:05:58 UTC 2014
Hallo Leute,
Am Montag, 9. Juni 2014 schrieb Christian Boltz:
> However, a warning can't hurt. Slightly updated patch:
Well, actually it can hurt - if you don't import the warn() function ;-)
So here's v3:
=== modified file 'utils/aa-genprof'
--- utils/aa-genprof 2014-05-21 19:42:43 +0000
+++ utils/aa-genprof 2014-06-09 19:04:51 +0000
@@ -21,6 +21,7 @@
import apparmor.aa as apparmor
import apparmor.ui as aaui
+from apparmor.common import warn
# setup module translations
from apparmor.translations import init_translation
@@ -33,7 +34,8 @@
return value
def sysctl_write(path, value):
- if not value:
+ if value is None:
+ warn('Not writing invalid value "None" to %s'%path)
return
with open(path, 'w') as f_out:
f_out.write(str(value))
Regards,
Christian Boltz
--
<BartOtten> and devs, well they are just a different type of
human :) [...]
<suseROCKs> Devs are human?? :-)
[from #opensuse-project]
More information about the AppArmor
mailing list