[apparmor] [patch] Drop unused global variables in aa.py
Steve Beattie
steve at nxnw.org
Thu Jan 19 23:02:22 UTC 2017
On Thu, Jan 19, 2017 at 11:24:13PM +0100, Christian Boltz wrote:
> grepping through the code shows that running_under_genprof,
> unimplemented_warning, ALL, t, seen and skip are unused, so drop them.
>
> [ 01-unused-global.diff ]
>
> --- utils/apparmor/aa.py 2017-01-18 22:19:23.971405280 +0100
> +++ utils/apparmor/aa.py 2017-01-19 23:13:17.063279610 +0100
> @@ -74,8 +74,6 @@
> debug_logger = DebugLogger('aa')
>
> CONFDIR = '/etc/apparmor'
> -running_under_genprof = False
> -unimplemented_warning = False
>
> # The database for severity
> sev_db = None
> @@ -99,12 +97,7 @@
> # format: user_globs['/foo*'] = AARE('/foo*')
> user_globs = {}
>
> -# The key for representing bare "file," rules
> -ALL = '\0ALL'
> -
> ## Variables used under logprof
> -### Were our
> -t = hasher() # dict()
> transitions = hasher()
>
> aa = hasher() # Profiles originally in sd, replace by aa
> @@ -96,12 +89,10 @@
> log = []
> pid = dict()
>
> -seen = hasher() # dir()
> profile_changes = hasher()
> prelog = hasher()
> changed = dict()
> created = []
> -skip = hasher()
> helpers = dict() # Preserve this between passes # was our
> ### logprof ends
>
> @@ -1900,7 +1891,6 @@
> # set up variables for this pass
> # t = hasher()
Can you kill the t = hasher() comment here, too?
Acked-by: Steve Beattie <steve at nxnw.org> with or without that change.
Thanks.
> # transitions = hasher()
> -# seen = hasher() # XXX global?
> global log
> log = []
> global existing_profiles
> @@ -1909,7 +1899,6 @@
> # profile_changes = hasher()
> # prelog = hasher()
> # changed = dict()
> -# skip = hasher() # XXX global?
> # filelist = hasher()
>
> aaui.UI_Info(_('Reading log entries from %s.') % logfile)
>
>
> Regards,
>
> Christian Boltz
> --
> Bitte sende kein "postconf -n", so wie alles es tun.
> Das macht es nur unnötig einfach zu helfen.
> [Patrick Ben Koetter in postfixbuch-users]
> --
> AppArmor mailing list
> AppArmor at lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/apparmor
--
Steve Beattie
<sbeattie at ubuntu.com>
http://NxNW.org/~steve/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20170119/df800428/attachment.pgp>
More information about the AppArmor
mailing list