ud-generate: Make sure we only add people in gid 800 to debian-private.
authorPeter Palfrader <peter@palfrader.org>
Sun, 25 Oct 2009 15:41:17 +0000 (16:41 +0100)
committerPeter Palfrader <peter@palfrader.org>
Sun, 25 Oct 2009 15:41:17 +0000 (16:41 +0100)
DebianUsers was just a copy of PasswdAttrs.  So use PasswdAttrs in all
the places that currently use DebianUsers.  Make a filtered list
DebianDDUsers (accounts in gid 800), and use that for building the
debian-private subscription list.

debian/changelog
ud-generate

index d1789e0..10fe5a2 100644 (file)
@@ -1,3 +1,13 @@
+userdir-ldap (0.3.74) unstable; urgency=low
+
+  * ud-generate: Make sure we only add people in gid 800 to debian-private.
+    (DebianUsers was just a copy of PasswdAttrs.  So use PasswdAttrs in
+     all the places that currently use DebianUsers.  Make a filtered list
+     DebianDDUsers (accounts in gid 800), and use that for building the
+     debian-private subscription list.)
+
+ -- Peter Palfrader <weasel@debian.org>  Sun, 25 Oct 2009 16:38:04 +0100
+
 userdir-ldap (0.3.73) unstable; urgency=low
 
   * Add dnsTTL host attribute to override the zone default TTL
index 795816c..8ccd4b6 100755 (executable)
@@ -469,8 +469,8 @@ def GenGroup(File):
    return grouprevmap
 
 def CheckForward():
-   global DebianUsers
-   for x in DebianUsers:
+   global PasswdAttrs
+   for x in PasswdAttrs:
       if x[1].has_key("emailForward") == 0:
          continue
    
@@ -496,10 +496,10 @@ def GenForward(File):
       os.umask(OldMask)
      
       # Fetch all the users
-      global DebianUsers
+      global PasswdAttrs
      
       # Write out the email address for each user
-      for x in DebianUsers:
+      for x in PasswdAttrs:
          if x[1].has_key("emailForward") == 0:
             continue
      
@@ -521,10 +521,10 @@ def GenCDB(File, Key):
       os.umask(OldMask)
 
       # Fetch all the users
-      global DebianUsers
+      global PasswdAttrs
 
       # Write out the email address for each user
-      for x in DebianUsers:
+      for x in PasswdAttrs:
          if not Key in x[1]:
             continue
          Value = GetAttr(x, Key)
@@ -546,10 +546,10 @@ def GenMarkers(File):
       F = open(File + ".tmp", "w")
      
       # Fetch all the users
-      global DebianUsers
+      global PasswdAttrs
      
       # Write out the position for each user
-      for x in DebianUsers:
+      for x in PasswdAttrs:
          if x[1].has_key("latitude") == 0 or x[1].has_key("longitude") == 0:
             continue
          try:
@@ -572,10 +572,10 @@ def GenPrivate(File):
       F = open(File + ".tmp", "w")
      
       # Fetch all the users
-      global DebianUsers
+      global DebianDDUsers
      
       # Write out the position for each user
-      for x in DebianUsers:
+      for x in DebianDDUsers:
          if x[1].has_key("privateSub") == 0:
             continue
      
@@ -637,9 +637,9 @@ def GenMailDisable(File):
       F = open(File + ".tmp", "w")
      
       # Fetch all the users
-      global DebianUsers
+      global PasswdAttrs
      
-      for x in DebianUsers:
+      for x in PasswdAttrs:
          Reason = None
      
          if x[1].has_key("mailDisableMessage"):
@@ -667,9 +667,9 @@ def GenMailBool(File, Key):
       F = open(File + ".tmp", "w")
      
       # Fetch all the users
-      global DebianUsers
+      global PasswdAttrs
      
-      for x in DebianUsers:
+      for x in PasswdAttrs:
          Reason = None
      
          if x[1].has_key(Key) == 0:
@@ -698,9 +698,9 @@ def GenMailList(File, Key):
       F = open(File + ".tmp", "w")
      
       # Fetch all the users
-      global DebianUsers
+      global PasswdAttrs
      
-      for x in DebianUsers:
+      for x in PasswdAttrs:
          Reason = None
      
          if x[1].has_key(Key) == 0:
@@ -903,10 +903,10 @@ def GenBSMTP(File, HomePrefix):
       F = open(File + ".tmp", "w")
      
       # Fetch all the users
-      global DebianUsers
+      global PasswdAttrs
      
       # Write out the zone file entry for each user
-      for x in DebianUsers:
+      for x in PasswdAttrs:
          if x[1].has_key("dnsZoneEntry") == 0:
             continue
      
@@ -1095,8 +1095,7 @@ GlobalDir = GenerateDir + "/"
 GenDisabledAccounts(GlobalDir + "disabled-accounts")
 
 PasswdAttrs = filter(lambda x: not IsRetired(x), PasswdAttrs)
-#DebianUsers = filter(lambda x: IsGidDebian(x), PasswdAttrs)
-DebianUsers = PasswdAttrs
+DebianDDUsers = filter(lambda x: IsGidDebian(x), PasswdAttrs)
 
 CheckForward()