X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=ud-info;h=ce06934113e36dacd334bc82bd0b635e74eb6410;hb=d34f4cb87a80d211f07fc1bfb2b9a630d1346e7c;hp=4245931f8c36304a7002afef6c5e143966124e2b;hpb=ee3eb0677056b25df70d8fe93a74cb2e6c0e38f5;p=mirror%2Fuserdir-ldap.git diff --git a/ud-info b/ud-info index 4245931..ce06934 100755 --- a/ud-info +++ b/ud-info @@ -16,8 +16,6 @@ # 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; from userdir_ldap import *; @@ -121,26 +119,7 @@ def PrintKeys(Attrs): 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): @@ -153,11 +132,8 @@ def PrintSshRSAKeys(Attrs): First = 1; else: print "%-24s:" % (""), - Split = string.split(x," "); - - if len(Split) != 4: - del Split[0]; - print Split[0],Split[1],Split[2][:8]+".."+Split[2][-8:],string.join(Split[3:]); + + print FormatSSHAuth(x); # Display all of the attributes in a numbered list def ShowAttrs(Attrs):