projects
/
mirror
/
userdir-ldap.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
gpg 1.0.3-2 (including rsa in the binary) is needed.
[mirror/userdir-ldap.git]
/
ud-generate
diff --git
a/ud-generate
b/ud-generate
index
a379826
..
afc6b16
100755
(executable)
--- a/
ud-generate
+++ b/
ud-generate
@@
-2,7
+2,7
@@
# -*- mode: python -*-
# Generates passwd, shadow and group files from the ldap directory.
# -*- mode: python -*-
# Generates passwd, shadow and group files from the ldap directory.
-import string, re, time, ldap, getopt, sys, os, pwd, posix;
+import string, re, time, ldap, getopt, sys, os, pwd, posix
, socket
;
from userdir_ldap import *;
PasswdAttrs = None;
from userdir_ldap import *;
PasswdAttrs = None;
@@
-463,9
+463,9
@@
def GenSSHKnown(l,File):
SHost = string.find(Host,".");
for I in x[1]["sshrsahostkey"]:
if SHost == None:
SHost = string.find(Host,".");
for I in x[1]["sshrsahostkey"]:
if SHost == None:
- Line = "%s
%s" %(Host
,I);
+ Line = "%s
,%s %s" %(Host,socket.gethostbyname(Host)
,I);
else:
else:
- Line = "%s,%s
%s" %(Host,Host[0:SHost]
,I);
+ 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));
Line = Sanitize(Line) + "\n";
F.write(Line);
Fdb.write("+%d,%d:%s->%s\n"%(len(Host),len(I),Host,I));