Fixed a wrong assumption: A clone of sshd is not necessarly a related to a user

This commit is contained in:
Gerard Wagener 2010-01-20 17:05:06 +01:00
parent 54d3a0d153
commit 51da827445

View file

@ -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):