mirror of
https://github.com/evilsocket/opensnitch.git
synced 2025-03-04 08:34:40 +01:00
Checking if it was possible to get the pid from socket inode.
This commit is contained in:
parent
ba62bd8b64
commit
606bb4d87c
1 changed files with 2 additions and 1 deletions
|
@ -66,7 +66,8 @@ def get_process_name_by_connection( src_addr, src_p, dst_addr, dst_p, proto = 't
|
|||
|
||||
if src_ip == src_addr and src_port == src_p and dst_ip == dst_addr and dst_port == dst_p:
|
||||
pid = get_pid_of_inode(inode)
|
||||
return ( pid, os.readlink( "/proc/%s/exe" % pid ) )
|
||||
if pid is not None:
|
||||
return ( pid, os.readlink( "/proc/%s/exe" % pid ) )
|
||||
|
||||
logging.error( "Could not find process for %s connection %s:%s -> %s:%s inside %s" % (
|
||||
proto,
|
||||
|
|
Loading…
Add table
Reference in a new issue