[apparmor] [patch] drop unused match_net_include() and match_net_includes() from aa.py

Seth Arnold seth.arnold at canonical.com
Mon May 18 21:17:26 UTC 2015


On Sun, May 17, 2015 at 09:05:50PM +0200, Christian Boltz wrote:
> Hallo,
> 
> aa-mergeprof no longer calls match_net_includes(), which means the
> function can be dropped.
> 
> After that, match_net_include() is also unused, so also drop it.
> 
> (Needless to mention that this depends on 08-mergeprof-network-rule.diff.)

Acked-by: Seth Arnold <seth.arnold at canonical.com>

Thanks

> 
> 
> [ 09-drop-match_net_include.diff ]
> 
> === modified file utils/apparmor/aa.py
> --- utils/apparmor/aa.py        2015-05-17 19:23:47.760238163 +0200
> +++ utils/apparmor/aa.py        2015-05-17 21:00:23.043443000 +0200
> @@ -2148,12 +2148,6 @@
>  
>      return deleted
>  
> -def match_net_include(incname, family, type):
> -    # still used by aa-mergeprof
> -    network_obj = NetworkRule(family, type)
> -    return match_includes(incname, 'network', network_obj)
> -
> -
>  def match_includes(profile, rule_type, rule_obj):
>      newincludes = []
>      for incname in include.keys():
> @@ -2186,15 +2180,6 @@
>  
>      return False
>  
> -def match_net_includes(profile, family, nettype):
> -    newincludes = []
> -    for incname in include.keys():
> -
> -        if valid_include(profile, incname) and match_net_include(incname, family, nettype):
> -            newincludes.append(incname)
> -
> -    return newincludes
> -
>  def set_logfile(filename):
>      ''' set logfile to a) the specified filename or b) if not given, the first existing logfile from logprof.conf'''
>  
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20150518/b4fbeeac/attachment.pgp>


More information about the AppArmor mailing list