From 1b03d6517b89547bd83e4ca4531b4a216dd732a9 Mon Sep 17 00:00:00 2001 From: Stephane Glondu Date: Thu, 19 Nov 2009 02:43:43 +0100 Subject: [PATCH] Allow adm to change any password (hopefully) darcs-hash:20091119014343-61eff-f6d44d66e95b840681bee0e671366061ad658569.gz --- gestion/chgpass.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gestion/chgpass.py b/gestion/chgpass.py index e6c3939a..e83855d0 100644 --- a/gestion/chgpass.py +++ b/gestion/chgpass.py @@ -19,7 +19,7 @@ Licence : GPLv2 """ import getpass, commands, os, sys, base64, syslog -from user_tests import getuser +from user_tests import getuser, isadm from affich_tools import cprint try : @@ -193,7 +193,7 @@ if __name__ == '__main__' : cprint({ 'Invalid credentials (49)': u'Mot de passe invalide' }.get(resultat, resultat), 'rouge') sys.exit(8) - elif len(s) > 3 and os.getuid()!=0 : + elif len(s) > 3 and os.getuid()!=0 and not isadm(): # Adhérent avec droits et on est pas root From = 'roots@crans.org' To = 'roots@crans.org'