diff --git a/attributs.py b/attributs.py index f1ec2fd..61cc3f5 100644 --- a/attributs.py +++ b/attributs.py @@ -505,6 +505,10 @@ class dn(Attr): singlevalue = True optional = False +class postalAddress(Attr): + singlevalue = False + optional = True + CRANS_ATTRIBUTES= { 'objectClass' : objectClass, 'cn' : cn, @@ -544,6 +548,7 @@ CRANS_ATTRIBUTES= { 'homepageAlias': homepageAlias, 'charteMA': charteMA, 'mail' : mail, + 'postalAddress': postalAddress, # {posix,shadow}Account 'homeDirectory': homeDirectory, @@ -553,3 +558,10 @@ CRANS_ATTRIBUTES= { 'gidNumber': gidNumber } +ADHERENT_ATTRS = [ nom, prenom, tel, chbre, postalAddress, mail, uid, + canonicalAlias, mailAlias, etudes, paiement, + solde, carteEtudiant, droits, loginShell, blacklist ] + +MACHINE_ATTRS = [ host, macAddress, hostAlias, ipHostNumber, portTCPout, + portTCPin, portUDPout, portUDPin ] + diff --git a/crans_utils.py b/crans_utils.py index 7dee801..5667a2b 100644 --- a/crans_utils.py +++ b/crans_utils.py @@ -29,7 +29,8 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -import netaddr, re, time, smtplib +import netaddr, re, time, smtplib, sys +sys.path.append('/usr/scripts/gestion') import config from unicodedata import normalize