From cfdd8b51f663f6449f79d40becd4403fd780fd46 Mon Sep 17 00:00:00 2001
From: Constantin Berhard <constantin@exxxtremesys.lu>
Date: Mon, 14 Oct 2013 20:46:03 +0200
Subject: [PATCH] tyshell who works now

---
 tyshell | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tyshell b/tyshell
index c9a0927..8d7070a 100755
--- a/tyshell
+++ b/tyshell
@@ -6,6 +6,7 @@ import sys
 import subprocess
 import socket
 import pwd
+import grp
 
 tuerSock = "/run/tuer.sock"
 
@@ -46,7 +47,8 @@ def exitcmd(c):
 	return True
 
 def whocmd(c):
-	for p in filter(lambda x:x.pw_shell=="/opt/tuer/tyshell",pwd.getpwall()):
+	for n in grp.getgrnam("tuer").gr_mem:
+		p = pwd.getpwnam(n)
 		print (p.pw_name, " - ", p.pw_gecos)
 
 commands = {
-- 
2.39.5