Report key fingerprint when adding ssh keys
authorPeter Palfrader <peter@palfrader.org>
Sat, 23 May 2015 08:44:23 +0000 (10:44 +0200)
committerPeter Palfrader <peter@palfrader.org>
Sat, 23 May 2015 08:44:23 +0000 (10:44 +0200)
ud-mailgate

index 2e16cce..c54aee5 100755 (executable)
@@ -354,11 +354,11 @@ def DoSSH(Str, Attrs, badkeys, uid):
    global SeenKey;
    if SeenKey:
      Attrs.append((ldap.MOD_ADD,"sshRSAAuthKey",Str));
-     return "SSH Key added "+FormatSSHAuth(Str);
+     return "SSH Key added: %s %s [%s]"%(key_size, fingerprint, FormatSSHAuth(Str))
 
    Attrs.append((ldap.MOD_REPLACE,"sshRSAAuthKey",Str));
    SeenKey = 1;
-   return "SSH Keys replaced with "+FormatSSHAuth(Str);
+   return "SSH Keys replaced with: %s %s [%s]"%(key_size, fingerprint, FormatSSHAuth(Str))
 
 # Handle changing a dns entry
 #  host IN A     12.12.12.12