remove (unused) ssh_known_hosts.cdb
gluck can also be used as a bsmtp host.
CurrentHost = "";
EmailCheck = re.compile("^([^ <>@]+@[^ ,<>@]+)?$");
CurrentHost = "";
EmailCheck = re.compile("^([^ <>@]+@[^ ,<>@]+)?$");
-BSMTPCheck = re.compile(".*mx 0 klecker\.debian\.org\..*",re.DOTALL);
+BSMTPCheck = re.compile(".*mx 0 (klecker|gluck)\.debian\.org\..*",re.DOTALL);
DNSZone = ".debian.net"
def Sanitize(Str):
DNSZone = ".debian.net"
def Sanitize(Str):
# Generate the password list
def GenPasswd(l,File,HomePrefix):
F = None;
# Generate the password list
def GenPasswd(l,File,HomePrefix):
F = None;
try:
F = open(File + ".tmp","w");
try:
F = open(File + ".tmp","w");
- Fdb = open(File + ".tdb.tmp","w");
# Fetch all the users
global PasswdAttrs;
if PasswdAttrs == None:
raise "No Users";
# Fetch all the users
global PasswdAttrs;
if PasswdAttrs == None:
raise "No Users";
for x in PasswdAttrs:
if x[1].has_key("uidnumber") == 0 or IsInGroup(x) == 0:
continue;
for x in PasswdAttrs:
if x[1].has_key("uidnumber") == 0 or IsInGroup(x) == 0:
continue;
GetAttr(x,"gecos"),HomePrefix,GetAttr(x,"uid"),\
GetAttr(x,"loginshell"));
F.write(Line);
GetAttr(x,"gecos"),HomePrefix,GetAttr(x,"uid"),\
GetAttr(x,"loginshell"));
F.write(Line);
- Fdb.write("0%u %s" % (I,Line));
- Fdb.write(".%s %s" % (GetAttr(x,"uid"),Line));
- Fdb.write("=%s %s" % (GetAttr(x,"uidnumber"),Line));
- I = I + 1;
# Oops, something unspeakable happened.
except:
# Oops, something unspeakable happened.
except:
# Generate the shadow list
def GenShadow(l,File):
F = None;
# Generate the shadow list
def GenShadow(l,File):
F = None;
try:
OldMask = os.umask(0077);
F = open(File + ".tmp","w",0600);
try:
OldMask = os.umask(0077);
F = open(File + ".tmp","w",0600);
- Fdb = open(File + ".tdb.tmp","w",0600);
os.umask(OldMask);
# Fetch all the users
os.umask(OldMask);
# Fetch all the users
if PasswdAttrs == None:
raise "No Users";
if PasswdAttrs == None:
raise "No Users";
for x in PasswdAttrs:
if x[1].has_key("uidnumber") == 0 or IsInGroup(x) == 0:
continue;
for x in PasswdAttrs:
if x[1].has_key("uidnumber") == 0 or IsInGroup(x) == 0:
continue;
GetAttr(x,"shadowexpire"));
Line = Sanitize(Line) + "\n";
F.write(Line);
GetAttr(x,"shadowexpire"));
Line = Sanitize(Line) + "\n";
F.write(Line);
- Fdb.write("0%u %s" % (I,Line));
- Fdb.write(".%s %s" % (GetAttr(x,"uid"),Line));
- I = I + 1;
# Oops, something unspeakable happened.
except:
# Oops, something unspeakable happened.
except:
# Generate the shadow list
def GenSSHShadow(l,File):
F = None;
# Generate the shadow list
def GenSSHShadow(l,File):
F = None;
try:
OldMask = os.umask(0077);
F = open(File + ".tmp","w",0600);
try:
OldMask = os.umask(0077);
F = open(File + ".tmp","w",0600);
- Fdb = os.popen("cdbmake %s.cdb %s.cdb.tmp"%(File,File),"w");
os.umask(OldMask);
# Fetch all the users
os.umask(OldMask);
# Fetch all the users
if PasswdAttrs == None:
raise "No Users";
if PasswdAttrs == None:
raise "No Users";
for x in PasswdAttrs:
if x[1].has_key("uidnumber") == 0 or \
x[1].has_key("sshrsaauthkey") == 0:
for x in PasswdAttrs:
if x[1].has_key("uidnumber") == 0 or \
x[1].has_key("sshrsaauthkey") == 0:
Line = "%s: %s" %(User,I);
Line = Sanitize(Line) + "\n";
F.write(Line);
Line = "%s: %s" %(User,I);
Line = Sanitize(Line) + "\n";
F.write(Line);
- Fdb.write("+%d,%d:%s->%s\n"%(len(User),len(I),User,I));
- Fdb.write("\n");
# Oops, something unspeakable happened.
except:
# Oops, something unspeakable happened.
except:
- if Fdb.close() != None:
- raise "cdbmake gave an error";
Done(File,F,None);
# Generate the group list
def GenGroup(l,File):
F = None;
Done(File,F,None);
# Generate the group list
def GenGroup(l,File):
F = None;
try:
F = open(File + ".tmp","w");
try:
F = open(File + ".tmp","w");
- Fdb = open(File + ".tdb.tmp","w");
# Generate the GroupMap
GroupMap = {};
# Generate the GroupMap
GroupMap = {};
print "Group does not exist ",I,"but",GetAttr(x,"uid"),"is in it";
# Output the group file.
print "Group does not exist ",I,"but",GetAttr(x,"uid"),"is in it";
# Output the group file.
for x in GroupMap.keys():
if GroupIDMap.has_key(x) == 0:
continue;
for x in GroupMap.keys():
if GroupIDMap.has_key(x) == 0:
continue;
Comma = ',';
Line = Sanitize(Line) + "\n";
F.write(Line);
Comma = ',';
Line = Sanitize(Line) + "\n";
F.write(Line);
- Fdb.write("0%u %s" % (Counter,Line));
- Fdb.write(".%s %s" % (x,Line));
- Fdb.write("=%u %s" % (GroupIDMap[x],Line));
- Counter = Counter + 1;
# Oops, something unspeakable happened.
except:
# Oops, something unspeakable happened.
except:
# Generate the email forwarding list
def GenForward(l,File):
# Generate the email forwarding list
def GenForward(l,File):
# Generate the shadow list
def GenSSHKnown(l,File):
F = None;
# Generate the shadow list
def GenSSHKnown(l,File):
F = None;
try:
OldMask = os.umask(0022);
F = open(File + ".tmp","w",0644);
try:
OldMask = os.umask(0022);
F = open(File + ".tmp","w",0644);
- Fdb = os.popen("cdbmake %s.cdb %s.cdb.tmp"%(File,File),"w");
os.umask(OldMask);
# Fetch all the hosts
os.umask(OldMask);
# Fetch all the hosts
if HostKeys == None:
raise "No Hosts";
if HostKeys == None:
raise "No Hosts";
for x in HostKeys:
if x[1].has_key("hostname") == 0 or \
x[1].has_key("sshrsahostkey") == 0:
for x in HostKeys:
if x[1].has_key("hostname") == 0 or \
x[1].has_key("sshrsahostkey") == 0:
Line = "%s,%s,%s %s" %(Host,Host[0:SHost],socket.gethostbyname(Host),I);
Line = Sanitize(Line) + "\n";
F.write(Line);
Line = "%s,%s,%s %s" %(Host,Host[0:SHost],socket.gethostbyname(Host),I);
Line = Sanitize(Line) + "\n";
F.write(Line);
- Fdb.write("+%d,%d:%s->%s\n"%(len(Host),len(I),Host,I));
- Fdb.write("\n");
# Oops, something unspeakable happened.
except:
# Oops, something unspeakable happened.
except:
- if Fdb.close() != None:
- raise "cdbmake gave an error";
# Link in global things
DoLink(GlobalDir,OutDir,"ssh-rsa-shadow");
# Link in global things
DoLink(GlobalDir,OutDir,"ssh-rsa-shadow");
- DoLink(GlobalDir,OutDir,"ssh-rsa-shadow.cdb");
DoLink(GlobalDir,OutDir,"markers");
DoLink(GlobalDir,OutDir,"mail-forward.cdb");
DoLink(GlobalDir,OutDir,"ssh_known_hosts");
DoLink(GlobalDir,OutDir,"markers");
DoLink(GlobalDir,OutDir,"mail-forward.cdb");
DoLink(GlobalDir,OutDir,"ssh_known_hosts");