From e4d87a4fc7fa66ed217ff2b68afdfa2112bbf5fa Mon Sep 17 00:00:00 2001 From: Hugo Levy-Falk Date: Sun, 1 Sep 2019 15:38:34 +0200 Subject: [PATCH] Hot and dirty fix for Debian Buster. --- .../freeradius3/sites-enabled/default | 25 ++++++++++--------- users/models.py | 2 +- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/freeradius_utils/freeradius3/sites-enabled/default b/freeradius_utils/freeradius3/sites-enabled/default index a9f7318e..5aaecd9c 100644 --- a/freeradius_utils/freeradius3/sites-enabled/default +++ b/freeradius_utils/freeradius3/sites-enabled/default @@ -92,19 +92,20 @@ server radius-wifi { authorize { rewrite_calling_station_id - if (User-Name =~ /^(.*)@(.*)/){ - if (User-Name !~ /^(.*)@(.*)example(.*)/){ - update control{ - Proxy-To-Realm := 'FEDEREZ' - } - } + # A decommenter pour activer le radius federez + #if (User-Name =~ /^(.*)@(.*)/){ + # if (User-Name !~ /^(.*)@(.*)example(.*)/){ + # update control{ + # Proxy-To-Realm := 'FEDEREZ' + # } + # } - if ("%{request:User-Name}" =~ /^(.*)@(.*)example(.*)/){ - update request{ - Stripped-User-Name := "%{1}" - } - } - } + # if ("%{request:User-Name}" =~ /^(.*)@(.*)example(.*)/){ + # update request{ + # Stripped-User-Name := "%{1}" + # } + # } + #} filter_username diff --git a/users/models.py b/users/models.py index 823d1f7f..8f8a5e1d 100755 --- a/users/models.py +++ b/users/models.py @@ -78,7 +78,6 @@ import ldapdb.models import ldapdb.models.fields from re2o.settings import LDAP, GID_RANGES, UID_RANGES -from re2o.login import hashNT from re2o.field_permissions import FieldPermissionModelMixin from re2o.mixins import AclMixin, RevMixin from re2o.base import smtp_check @@ -817,6 +816,7 @@ class User(RevMixin, FieldPermissionModelMixin, AbstractBaseUser, def set_password(self, password): """ A utiliser de préférence, set le password en hash courrant et dans la version ntlm""" + from re2o.login import hashNT super().set_password(password) self.pwd_ntlm = hashNT(password) return