[apparmor] [PATCH] make aa-unconfined include ipv6

John Johansen john.johansen at canonical.com
Fri Dec 2 00:13:26 UTC 2016


aa-unconfined currently does not check/display ipv6 fix this

Signed-off-by: John Johansen <john.johansen at canonical.com>

=== modified file 'utils/aa-unconfined'
--- utils/aa-unconfined	2016-10-01 18:57:09 +0000
+++ utils/aa-unconfined	2016-12-02 00:09:27 +0000
@@ -46,10 +46,10 @@
     regex_tcp_udp = re.compile(r"^(tcp|udp)\s+\d+\s+\d+\s+\S+\:(\d+)\s+\S+\:(\*|\d+)\s+(LISTEN|\s+)\s+(\d+)\/(\S+)")
     import subprocess
     if sys.version_info < (3, 0):
-        output = subprocess.check_output("LANG=C netstat -nlp", shell=True).split("\n")
+        output = subprocess.check_output("LANG=C netstat -nlp46", shell=True).split("\n")
     else:
         #Python3 needs to translate a stream of bytes to string with specified encoding
-        output = str(subprocess.check_output("LANG=C netstat -nlp", shell=True), encoding='utf8').split("\n")
+        output = str(subprocess.check_output("LANG=C netstat -nlp46", shell=True), encoding='utf8').split("\n")
 
     for line in output:
         match = regex_tcp_udp.search(line)




More information about the AppArmor mailing list