X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=ud-generate;h=8ccd4b64bd418b05a0afc5049bd0377bc15f51b5;hb=a9b820e58ff5a515891cb2b5d2863e6960ecd9d4;hp=795816ca0e03594cc5b524fcee843fb89b143df6;hpb=ce64087cfde96cea951f7d016aff0128fb7cf678;p=mirror%2Fuserdir-ldap.git 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()