allow groups to be disabled but kept in ldap: addresses RT #977
authorStephen Gran <steve@lobefin.net>
Sun, 20 Sep 2009 15:42:55 +0000 (16:42 +0100)
committerStephen Gran <steve@lobefin.net>
Sun, 20 Sep 2009 15:42:55 +0000 (16:42 +0100)
Signed-off-by: Stephen Gran <steve@lobefin.net>
ud-generate
userdir-ldap.schema

index 334af5d..386dce6 100755 (executable)
@@ -1046,6 +1046,8 @@ Attrs = l.search_s(BaseDn, ldap.SCOPE_ONELEVEL, "gid=*",\
 
 # Generate the SubGroupMap and GroupIDMap
 for x in Attrs:
+   if x[1].has_key("status") and x[1]['status'] == "disabled":
+      continue
    if x[1].has_key("gidNumber") == 0:
       continue
    GroupIDMap[x[1]["gid"][0]] = int(x[1]["gidNumber"][0])
index de3b80a..ca2dc83 100644 (file)
@@ -409,7 +409,7 @@ objectclass ( 1.3.6.1.4.1.9586.100.4.1.2
        SUP top STRUCTURAL
        DESC 'attributes used for Debian groups'
        MUST ( gid $ gidNumber )
-       MAY ( description $ subGroup ) )
+       MAY ( description $ subGroup $ accountStatus ) )
 
 # Experimental attribute types