From 4fa3ef8d8a8a3cddf8025d306c3b90b37dd431bc Mon Sep 17 00:00:00 2001 From: Jan Cholasta Date: Wed, 18 Apr 2012 07:05:29 -0400 Subject: SSH: Add support for hashed known_hosts https://fedorahosted.org/sssd/ticket/1203 --- src/util/sss_ssh.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/util/sss_ssh.c') diff --git a/src/util/sss_ssh.c b/src/util/sss_ssh.c index 0163c1d89..60ed5878a 100644 --- a/src/util/sss_ssh.c +++ b/src/util/sss_ssh.c @@ -136,13 +136,18 @@ char * sss_ssh_format_pubkey(TALLOC_CTX *mem_ctx, struct sss_ssh_ent *ent, struct sss_ssh_pubkey *pubkey, - enum sss_ssh_pubkey_format format) + enum sss_ssh_pubkey_format format, + const char *comment) { TALLOC_CTX *tmp_ctx; char *blob; char *algo; char *result = NULL; + if (!comment) { + comment = ent->name; + } + tmp_ctx = talloc_new(NULL); if (!tmp_ctx) { return NULL; @@ -166,7 +171,7 @@ sss_ssh_format_pubkey(TALLOC_CTX *mem_ctx, goto done; } - result = talloc_asprintf(mem_ctx, "%s %s %s", algo, blob, ent->name); + result = talloc_asprintf(mem_ctx, "%s %s %s", algo, blob, comment); break; } -- cgit