projects
/
mirror
/
userdir-ldap.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
posix -> os
[mirror/userdir-ldap.git]
/
ud-info
diff --git
a/ud-info
b/ud-info
index
7159772
..
c77b2d2
100755
(executable)
--- a/
ud-info
+++ b/
ud-info
@@
-16,10
+16,8
@@
# database
# -r Enable 'root' functions, do this if your uid has access to
# restricted variables.
# database
# -r Enable 'root' functions, do this if your uid has access to
# restricted variables.
-#
-# http://www.geocode.com/eagle.html-ssi
-import string, time,
posix
, pwd, sys, getopt, ldap, crypt, whrandom, readline, copy;
+import string, time,
os
, pwd, sys, getopt, ldap, crypt, whrandom, readline, copy;
from userdir_ldap import *;
RootMode = 0;
from userdir_ldap import *;
RootMode = 0;
@@
-121,26
+119,7
@@
def PrintKeys(Attrs):
First = 1;
else:
print "%-24s:" % (""),
First = 1;
else:
print "%-24s:" % (""),
-
- # PGP Print
- if (len(x) == 32):
- I = 0;
- while (I < len(x)):
- print x[I]+x[I+1],
- I = I + 2;
- if I == 32/2:
- print "",
- elif (len(x) == 40):
- # GPG Print
- I = 0;
- while (I < len(x)):
- print x[I]+x[I+1]+x[I+2]+x[I+3],
- I = I + 4;
- if I == 40/2:
- print "",
- else:
- print x,
- print;
+ print FormatPGPKey(x);
# Print the SSH RSA Authentication keys for a user
def PrintSshRSAKeys(Attrs):
# Print the SSH RSA Authentication keys for a user
def PrintSshRSAKeys(Attrs):
@@
-256,7
+235,7
@@
def MultiChangeAttr(Attrs,Attr):
print;
# Main program starts here
print;
# Main program starts here
-User = pwd.getpwuid(
posix
.getuid())[0];
+User = pwd.getpwuid(
os
.getuid())[0];
BindUser = User;
# Process options
(options, arguments) = getopt.getopt(sys.argv[1:], "nu:c:a:r")
BindUser = User;
# Process options
(options, arguments) = getopt.getopt(sys.argv[1:], "nu:c:a:r")