From: joey <> Date: Wed, 27 Oct 2004 12:03:39 +0000 (+0000) Subject: Import from samosa: case sensitive LDAP attributes X-Git-Tag: debian_userdir-ldap_0-3-7~45 X-Git-Url: https://git.adam-barratt.org.uk/?p=mirror%2Fuserdir-ldap.git;a=commitdiff_plain;h=15723a3fe0678c184f1bcce91a99584b48cb7e92 Import from samosa: case sensitive LDAP attributes --- diff --git a/ud-groupadd b/ud-groupadd index 94b25e1..04af160 100755 --- a/ud-groupadd +++ b/ud-groupadd @@ -13,10 +13,10 @@ from userdir_gpg import *; def GetFreeID(l): HighestUID = 1000; Attrs = l.search_s(BaseDn,ldap.SCOPE_ONELEVEL, - "gidnumber>="+str(HighestUID),["gidnumber"]); + "gidNumber>="+str(HighestUID),["gidNumber"]); HighestUID = 0; for I in Attrs: - ID = int(GetAttr(I,"gidnumber","0")); + ID = int(GetAttr(I,"gidNumber","0")); if ID > HighestUID and ID < 60000: HighestUID = ID; return HighestUID + 1; @@ -59,6 +59,6 @@ Dn = "gid=" + Group + "," + BaseDn; print "Updating LDAP directory..", sys.stdout.flush(); l.add_s(Dn,[("gid",Group), - ("gidnumber",str(Id)), + ("gidNumber",str(Id)), ("objectclass","top"), ("objectclass","posixGroup")]);