From 0d0d9d96760198e93dc906ddf60ab75c2462efbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre-Elliott=20B=C3=A9cue?= Date: Mon, 4 Mar 2013 05:16:40 +0100 Subject: [PATCH] =?UTF-8?q?[lc=5Fldap]=20Correction=20de=20bug=20d=C3=BB?= =?UTF-8?q?=20aux=20rid=20sp=C3=A9ciaux...?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crans_utils.py | 5 ++++- lc_ldap.py | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/crans_utils.py b/crans_utils.py index 922dc1b..5737ce1 100644 --- a/crans_utils.py +++ b/crans_utils.py @@ -93,7 +93,10 @@ def ip6_of_mac(mac, rid): euid64v6 = hex(int(mac[:2], 16)^0b00000010) + mac[2:6] + 'fffe' + mac[6:12] # fil-v6 ou wifi-v6, we don't care - return netaddr.IPAddress(netaddr.IPNetwork(config.prefix[net][0]).first + int(euid64v6, 16)) + if net != "special": + return netaddr.IPAddress(netaddr.IPNetwork(config.prefix[net][0]).first + int(euid64v6, 16)) + else: + return config.ipv6_machines_speciales[rid] def strip_accents(a): """ Supression des accents de la chaîne fournie""" diff --git a/lc_ldap.py b/lc_ldap.py index 947ec71..ceae960 100644 --- a/lc_ldap.py +++ b/lc_ldap.py @@ -819,7 +819,7 @@ class AssociationCrans(proprio): class adherent(proprio): u"""Adhérent crans.""" - ufields = proprio.ufields + ['aid', 'prenom', 'tel', 'mail', 'mailInvalide'] + ufields = proprio.ufields + ['aid', 'prenom', 'tel', 'mail', 'mailInvalide', 'uid'] ofields = proprio.ofields + ['charteMA', 'canonicalAlias', 'solde', 'contourneGreylist', 'rewriteMailHeaders', 'derniereConnexion',