[./radius_auth.py] Style
darcs-hash:20090318182323-8fbb1-04220e4413b9cce37cf6ac91533d341319d3090f.gz
This commit is contained in:
parent
7c2c5f297a
commit
c5429b3cee
1 changed files with 2 additions and 5 deletions
|
@ -2,8 +2,7 @@
|
||||||
# -*- coding: iso-8859-15 -*-
|
# -*- coding: iso-8859-15 -*-
|
||||||
|
|
||||||
import os, md5, sys, binascii
|
import os, md5, sys, binascii
|
||||||
from commands import getoutput
|
from syslog import syslog, openlog
|
||||||
from syslog import *
|
|
||||||
|
|
||||||
sys.path.append('/usr/scripts/gestion')
|
sys.path.append('/usr/scripts/gestion')
|
||||||
from ldap_crans import crans_ldap, AssociationCrans, Club
|
from ldap_crans import crans_ldap, AssociationCrans, Club
|
||||||
|
@ -23,9 +22,7 @@ def chap_ok(password, challenge, clear_pass) :
|
||||||
if md5.new(password[0] + clear_pass + challenge).digest() == password[1:] :
|
if md5.new(password[0] + clear_pass + challenge).digest() == password[1:] :
|
||||||
return True
|
return True
|
||||||
except :
|
except :
|
||||||
pass
|
return False
|
||||||
|
|
||||||
return False
|
|
||||||
|
|
||||||
def do_auth(mac):
|
def do_auth(mac):
|
||||||
"""Effectue l'authentification. Renvoie (success, msg,
|
"""Effectue l'authentification. Renvoie (success, msg,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue