From: Stephen Gran Date: Sun, 8 Nov 2009 18:38:00 +0000 (+0000) Subject: prepare to reuse GenCDB with a shorter list of users X-Git-Tag: userdir-ldap-0.3.74~4 X-Git-Url: https://git.adam-barratt.org.uk/?p=mirror%2Fuserdir-ldap.git;a=commitdiff_plain;h=27bf8069a8d4cee2c3b2eecd93f1aac1c1c01bb9 prepare to reuse GenCDB with a shorter list of users Signed-off-by: Stephen Gran --- diff --git a/ud-generate b/ud-generate index 8ccd4b6..3880d21 100755 --- a/ud-generate +++ b/ud-generate @@ -513,18 +513,15 @@ def GenForward(File): raise Done(File, F, None) -def GenCDB(File, Key): +def GenCDB(File, Users, Key): Fdb = None try: OldMask = os.umask(0022) Fdb = os.popen("cdbmake %s %s.tmp"%(File, File), "w") os.umask(OldMask) - # Fetch all the users - global PasswdAttrs - # Write out the email address for each user - for x in PasswdAttrs: + for x in Users: if not Key in x[1]: continue Value = GetAttr(x, Key) @@ -1100,8 +1097,8 @@ DebianDDUsers = filter(lambda x: IsGidDebian(x), PasswdAttrs) CheckForward() GenMailDisable(GlobalDir + "mail-disable") -GenCDB(GlobalDir + "mail-forward.cdb", 'emailForward') -GenCDB(GlobalDir + "mail-contentinspectionaction.cdb", 'mailContentInspectionAction') +GenCDB(GlobalDir + "mail-forward.cdb", PasswdAttrs, 'emailForward') +GenCDB(GlobalDir + "mail-contentinspectionaction.cdb", PasswdAttrs, 'mailContentInspectionAction') GenPrivate(GlobalDir + "debian-private") GenSSHKnown(GlobalDir+"authorized_keys", 'authorized_keys') GenMailBool(GlobalDir + "mail-greylist", "mailGreylisting")