[apparmor] RFC: The future of "(V)iew Changes" in aa-logprof
Christian Boltz
apparmor at cboltz.de
Sun Jun 3 17:51:04 UTC 2018
Hello,
Am Sonntag, 3. Juni 2018, 15:58:47 CEST schrieb Christian Boltz:
> My prefered option would be to change (V)iew Changes so that it writes
> the new profile in clean mode instead of least-possible-changes mode.
If you want to see in practise what this means:
--- a/utils/apparmor/aa.py
+++ b/utils/apparmor/aa.py
@@ -1894,7 +1894,8 @@ def save_profiles():
oldprofile = get_profile_filename(which)
try:
- newprofile = serialize_profile_from_old_profile(aa[which], which, '')
+ #newprofile = serialize_profile_from_old_profile(aa[which], which, '')
+ newprofile = serialize_profile(aa[which], which, '')
except AttributeError:
# see https://bugs.launchpad.net/ubuntu/+source/apparmor/+bug/1528139
newprofile = "###\n###\n### Internal error while generating diff, please use '%s' instead\n###\n###\n" % _('View Changes b/w (C)lean profiles')
This is a minimal patch (without cleanup etc.), but it's more than good
enough to see what it does ;-)
Regards,
Christian Boltz
--
..........why use Windows, if there is a door.............
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20180603/7c6993d0/attachment.sig>
More information about the AppArmor
mailing list