(self, executable)
return False
Check if kernel has ptrace/seccomp fixes added
           on 4.8.0.
           Only required for kernels below 4.8.0 to check
           if the patch has been backported e.g CentOS 7
Check if kernel has ptrace/seccomp fixes added
           on 4.8.0.
           Only required for kernels below 4.8.0 to check
           if the patch has been backported e.g CentOS 7
Check if kernel has ptrace / seccomp fixes added on 4 . 8 . 0 . Only required for kernels below 4 . 8 . 0 to check if the patch has been backported e . g CentOS 7
def _is_seccomp_patched(self, executable):
        """Check if kernel has ptrace/seccomp fixes added
           on 4.8.0.
           Only required for kernels below 4.8.0 to check
           if the patch has been backported e.g CentOS 7
        """
        if "PROOT_NEW_SECCOMP" in os.environ:
            return True
        if ("PROOT_NO_SECCOMP" in os.environ or
                self.proot_noseccomp or
                HostInfo().oskernel_isgreater([4, 8, 0])):
            return False
        host_file = self.container_dir + "/osenv.json"
        host_info = self._is_same_osenv(host_file)
        if host_info:
            if "PROOT_NEW_SECCOMP" in host_info:
                return True
            return False
        out = Uprocess().get_output([executable, "-r", "/",
                                     executable, "--help"])
        if not out:
            os.environ["PROOT_NEW_SECCOMP"] = "1"
            out = Uprocess().get_output([executable, "-r", "/",
                                         executable, "--help"])
            del os.environ["PROOT_NEW_SECCOMP"]
            if out:
                self._save_osenv(host_file,
                                      dict([("PROOT_NEW_SECCOMP", 1), ]))
                return True
        self._save_osenv(host_file)
        return False
def _is_seccomp_patched ( self , executable ) : if "PROOT_NEW_SECCOMP" in os . environ : return True if ( "PROOT_NO_SECCOMP" in os . environ or self . proot_noseccomp or HostInfo ( ) . oskernel_isgreater ( [ 4 , 8 , 0 ] ) ) : return False host_file = self . container_dir + "/osenv.json" host_info = self . _is_same_osenv ( host_file ) if host_info : if "PROOT_NEW_SECCOMP" in host_info : return True return False out = Uprocess ( ) . get_output ( [ executable , "-r" , "/" , executable , "--help" ] ) if not out : os . environ [ "PROOT_NEW_SECCOMP" ] = "1" out = Uprocess ( ) . get_output ( [ executable , "-r" , "/" , executable , "--help" ] ) del os . environ [ "PROOT_NEW_SECCOMP" ] if out : self . _save_osenv ( host_file , dict ( [ ( "PROOT_NEW_SECCOMP" , 1 ) , ] ) ) return True self . _save_osenv ( host_file ) return False