From 51da8274452811a062f07a466e8d080aa652ec11 Mon Sep 17 00:00:00 2001 From: Gerard Wagener Date: Wed, 20 Jan 2010 17:05:06 +0100 Subject: [PATCH] Fixed a wrong assumption: A clone of sshd is not necessarly a related to a user --- aha/ahalib.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/aha/ahalib.py b/aha/ahalib.py index dbed938de6a..bc59ecfdfae 100644 --- a/aha/ahalib.py +++ b/aha/ahalib.py @@ -226,6 +226,11 @@ class ProcessTrees: ts = time.strftime("%Y-%m-%d %H:%M:%S") f.write("*** UserList created on %s ***\n"%(str(ts))) for pid in self.userList.keys(): + #Each sshd clone is not necessarly related to a user + if (len(self.get_children(pid)) == 0): + #Discard empty subtrees + continue + f.write("** user root process %d **\n"%pid) #See if some annotation is found for this pid if self.aplist.has_key(pid):