Stop exporting locked accounts
authorStephen Gran <steve@lobefin.net>
Fri, 8 May 2009 23:40:59 +0000 (00:40 +0100)
committerStephen Gran <steve@lobefin.net>
Fri, 8 May 2009 23:40:59 +0000 (00:40 +0100)
ud-generate

index de97265..b3f0b58 100755 (executable)
@@ -33,6 +33,7 @@ global Allowed;
 global CurrentHost;
 
 PasswdAttrs = None;
+disabledusers = []
 GroupIDMap = {};
 SubGroupMap = {};
 Allowed = None;
@@ -585,6 +586,7 @@ def GenDisabledAccounts(l,File):
 
    # Fetch all the users
    global PasswdAttrs;
+   global disabledusers
    if PasswdAttrs == None:
       raise "No Users";
 
@@ -604,6 +606,8 @@ def GenDisabledAccounts(l,File):
       if Line != "":
          F.write(Sanitize(Line) + "\n")
 
+      disabledusers.append(x)
+
   # Oops, something unspeakable happened.
   except:
    Die(File,F,None);
@@ -1058,6 +1062,8 @@ GenKeyrings(l,GlobalDir);
 # Compatibility.
 GenForward(l,GlobalDir+"forward-alias");
 
+PasswdAttrs = filter(lambda x: not x in disabledusers, PasswdAttrs)
+
 while(1):
    Line = F.readline();
    if Line == "":