Allow adm to change any password (hopefully)
darcs-hash:20091119014343-61eff-f6d44d66e95b840681bee0e671366061ad658569.gz
This commit is contained in:
parent
ef1b93cc42
commit
1b03d6517b
1 changed files with 2 additions and 2 deletions
|
@ -19,7 +19,7 @@ Licence : GPLv2
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import getpass, commands, os, sys, base64, syslog
|
import getpass, commands, os, sys, base64, syslog
|
||||||
from user_tests import getuser
|
from user_tests import getuser, isadm
|
||||||
|
|
||||||
from affich_tools import cprint
|
from affich_tools import cprint
|
||||||
try :
|
try :
|
||||||
|
@ -193,7 +193,7 @@ if __name__ == '__main__' :
|
||||||
cprint({ 'Invalid credentials (49)': u'Mot de passe invalide' }.get(resultat, resultat), 'rouge')
|
cprint({ 'Invalid credentials (49)': u'Mot de passe invalide' }.get(resultat, resultat), 'rouge')
|
||||||
sys.exit(8)
|
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
|
# Adhérent avec droits et on est pas root
|
||||||
From = 'roots@crans.org'
|
From = 'roots@crans.org'
|
||||||
To = 'roots@crans.org'
|
To = 'roots@crans.org'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue