On Fri, Aug 12, 2016 at 10:48:45PM +0200, Christian Boltz wrote:
> Hello,
> 
> after dropping the dead code in handle_children(), there's only one use
> of contains() left in log_str_to_mode().
> 
> This patch changes log_str_to_mode to use mode_contains() and drops the
> now unused contains() function.
> 
> 
> [ 09-aamode-drop-contains.diff ]

Acked-by: Seth Arnold <[email protected]>

Thanks

> 
> === modified file 'utils/apparmor/aamode.py'
> --- utils/apparmor/aamode.py  2015-02-03 11:47:36 +0000
> +++ utils/apparmor/aamode.py  2016-02-03 23:45:39 +0000
> @@ -123,9 +123,6 @@
>  
>      return (mode & subset) == subset
>  
> -def contains(mode, string):
> -    return mode_contains(mode, str_to_mode(string))
> -
>  def validate_log_mode(mode):
>      if LOG_MODE_RE.search(mode):
>          return True
> @@ -249,7 +246,7 @@
>      mode = str_to_mode(string)
>      # If contains nx and nix
>      #print (profile, string, nt_name)
> -    if contains(mode, 'Nx'):
> +    if mode_contains(mode, str_to_mode('Nx')):
>          # Transform to px, cx
>          match = re.search('(.+?)//(.+?)', nt_name)
>          if match:
> 
> 

Attachment: signature.asc
Description: PGP signature

-- 
AppArmor mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/apparmor

Reply via email to