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:
be3ce73
)
Back out UIDShift patch, which wasn't correct anyway and shouldn't be merged
author
Marc 'HE' Brockschmidt
<he@debian.org>
Thu, 10 Jan 2008 14:17:11 +0000
(15:17 +0100)
committer
Marc 'HE' Brockschmidt
<he@debian.org>
Thu, 10 Jan 2008 14:17:11 +0000
(15:17 +0100)
to -common (yet)
ud-generate
patch
|
blob
|
history
diff --git
a/ud-generate
b/ud-generate
index
feec2b1
..
8537f0c
100755
(executable)
--- a/
ud-generate
+++ b/
ud-generate
@@
-88,7
+88,7
@@
def Done(File,F,Fdb):
os.rename(File + ".tdb.tmp",File+".tdb");
# Generate the password list
os.rename(File + ".tdb.tmp",File+".tdb");
# Generate the password list
-def GenPasswd(l,File,HomePrefix,PwdMarker
,UidShift
):
+def GenPasswd(l,File,HomePrefix,PwdMarker):
F = None;
try:
F = open(File + ".tdb.tmp","w");
F = None;
try:
F = open(File + ".tdb.tmp","w");
@@
-116,7
+116,7
@@
def GenPasswd(l,File,HomePrefix,PwdMarker,UidShift):
Line = Sanitize(Line) + "\n";
F.write("0%u %s" % (I,Line));
F.write(".%s %s" % (GetAttr(x,"uid"),Line));
Line = Sanitize(Line) + "\n";
F.write("0%u %s" % (I,Line));
F.write(".%s %s" % (GetAttr(x,"uid"),Line));
- F.write("=%s %s" % (
(int(GetAttr(x,"uidNumber"))+UidShift
),Line));
+ F.write("=%s %s" % (
GetAttr(x,"uidNumber"
),Line));
I = I + 1;
# Oops, something unspeakable happened.
I = I + 1;
# Oops, something unspeakable happened.
@@
-209,7
+209,7
@@
def GenSSHShadow(l,File):
Done(File,F,None);
# Generate the group list
Done(File,F,None);
# Generate the group list
-def GenGroup(l,File
,UidShift
):
+def GenGroup(l,File):
F = None;
try:
F = open(File + ".tdb.tmp","w");
F = None;
try:
F = open(File + ".tdb.tmp","w");
@@
-242,10
+242,7
@@
def GenGroup(l,File,UidShift):
for x in GroupMap.keys():
if GroupIDMap.has_key(x) == 0:
continue;
for x in GroupMap.keys():
if GroupIDMap.has_key(x) == 0:
continue;
- NewGid = int(GroupIDMap[x]);
- if NewGid >= 500:
- NewGid = NewGid + UidShift
- Line = "%s:x:%u:" % (x,NewGid)
+ Line = "%s:x:%u:" % (x,GroupIDMap[x]);
Comma = '';
for I in GroupMap[x]:
Line = Line + ("%s%s" % (Comma,I));
Comma = '';
for I in GroupMap[x]:
Line = Line + ("%s%s" % (Comma,I));
@@
-253,7
+250,7
@@
def GenGroup(l,File,UidShift):
Line = Sanitize(Line) + "\n";
F.write("0%u %s" % (J,Line));
F.write(".%s %s" % (x,Line));
Line = Sanitize(Line) + "\n";
F.write("0%u %s" % (J,Line));
F.write(".%s %s" % (x,Line));
- F.write("=%u %s" % (
NewGid
,Line));
+ F.write("=%u %s" % (
GroupIDMap[x]
,Line));
J = J + 1;
# Oops, something unspeakable happened.
J = J + 1;
# Oops, something unspeakable happened.
@@
-856,14
+853,12
@@
while(1):
DoLink(GlobalDir,OutDir,"disabled-accounts")
sys.stdout.flush();
DoLink(GlobalDir,OutDir,"disabled-accounts")
sys.stdout.flush();
- UidShift = 0
- if ExtraList.has_key("[UIDSHIFT]"): UidShift=1000
if ExtraList.has_key("[NOPASSWD]"):
if ExtraList.has_key("[NOPASSWD]"):
- GenPasswd(l,OutDir+"passwd",Split[1], "*"
, UidShift
);
+ GenPasswd(l,OutDir+"passwd",Split[1], "*");
else:
else:
- GenPasswd(l,OutDir+"passwd",Split[1], "x"
, UidShift
);
+ GenPasswd(l,OutDir+"passwd",Split[1], "x");
sys.stdout.flush();
sys.stdout.flush();
- GenGroup(l,OutDir+"group"
, UidShift
);
+ GenGroup(l,OutDir+"group");
if ExtraList.has_key("[UNTRUSTED]"):
continue;
if not ExtraList.has_key("[NOPASSWD]"):
if ExtraList.has_key("[UNTRUSTED]"):
continue;
if not ExtraList.has_key("[NOPASSWD]"):