From a9b820e58ff5a515891cb2b5d2863e6960ecd9d4 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Sun, 25 Oct 2009 16:41:17 +0100 Subject: [PATCH] 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. --- debian/changelog | 10 ++++++++++ ud-generate | 39 +++++++++++++++++++-------------------- 2 files changed, 29 insertions(+), 20 deletions(-) diff --git a/debian/changelog b/debian/changelog index d1789e0..10fe5a2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 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 diff --git a/ud-generate b/ud-generate index 795816c..8ccd4b6 100755 --- a/ud-generate +++ b/ud-generate @@ -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() -- 2.20.1