From 054b42044b53d6eb80c71a09ae2aaca066ef46eb Mon Sep 17 00:00:00 2001 From: Valentin Samir Date: Tue, 25 Oct 2011 22:46:43 +0200 Subject: [PATCH] =?UTF-8?q?[attributs.py]=20On=20mets=20la=20liste=20des?= =?UTF-8?q?=20shells=20en=20dur=20car=20se=20sont=20ceux=20install=C3=A9s?= =?UTF-8?q?=20sur=20zamok=20qui=20importent?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- attributs.py | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/attributs.py b/attributs.py index d1d58d4..3dd03eb 100644 --- a/attributs.py +++ b/attributs.py @@ -524,8 +524,27 @@ class loginShell(Attr): can_modify = ["self", "Nounou", "Cableur"] def parse_value(self, shell, ldif): - with open('/etc/shells') as f: - shells = [ l.strip() for l in f.readlines() if not l.startswith('#') ] + #with open('/etc/shells') as f: + # shells = [ l.strip() for l in f.readlines() if not l.startswith('#') ] + shells=['/bin/csh', + '/bin/sh', + '/usr/bin/es', + '/usr/bin/ksh', + '/bin/ksh', + '/usr/bin/rc', + '/usr/bin/tcsh', + '/bin/tcsh', + '/usr/bin/esh', + '/bin/bash', + '/bin/rbash', + '/bin/zsh', + '/usr/bin/zsh', + '/usr/bin/screen', + '/bin/dash', + '/usr/bin/rssh', + '/usr/local/bin/disconnect_shell', + '/usr/scripts/surveillance/disconnect_shell', + ''] if (shell not in shells): raise ValueError("Shell %s invalide" % shell) self.value = shell