projects
/
mirror
/
userdir-ldap.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
66a6c76
)
Stop exporting locked accounts
author
Stephen Gran
<steve@lobefin.net>
Fri, 8 May 2009 23:40:59 +0000
(
00:40
+0100)
committer
Stephen Gran
<steve@lobefin.net>
Fri, 8 May 2009 23:40:59 +0000
(
00:40
+0100)
ud-generate
patch
|
blob
|
history
diff --git
a/ud-generate
b/ud-generate
index
de97265
..
b3f0b58
100755
(executable)
--- a/
ud-generate
+++ b/
ud-generate
@@
-33,6
+33,7
@@
global Allowed;
global CurrentHost;
PasswdAttrs = None;
global CurrentHost;
PasswdAttrs = None;
+disabledusers = []
GroupIDMap = {};
SubGroupMap = {};
Allowed = None;
GroupIDMap = {};
SubGroupMap = {};
Allowed = None;
@@
-585,6
+586,7
@@
def GenDisabledAccounts(l,File):
# Fetch all the users
global PasswdAttrs;
# Fetch all the users
global PasswdAttrs;
+ global disabledusers
if PasswdAttrs == None:
raise "No Users";
if PasswdAttrs == None:
raise "No Users";
@@
-604,6
+606,8
@@
def GenDisabledAccounts(l,File):
if Line != "":
F.write(Sanitize(Line) + "\n")
if Line != "":
F.write(Sanitize(Line) + "\n")
+ disabledusers.append(x)
+
# Oops, something unspeakable happened.
except:
Die(File,F,None);
# Oops, something unspeakable happened.
except:
Die(File,F,None);
@@
-1058,6
+1062,8
@@
GenKeyrings(l,GlobalDir);
# Compatibility.
GenForward(l,GlobalDir+"forward-alias");
# Compatibility.
GenForward(l,GlobalDir+"forward-alias");
+PasswdAttrs = filter(lambda x: not x in disabledusers, PasswdAttrs)
+
while(1):
Line = F.readline();
if Line == "":
while(1):
Line = F.readline();
if Line == "":