From 3a5482e8b436805172df321cce9ecccf94d13c13 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Sun, 27 Jun 2021 11:27:55 -0700 Subject: SSH known host properties: add :IPS and :ADDITIONAL-NAMES parameters Signed-off-by: Sean Whitton --- src/property/sshd.lisp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/property/sshd.lisp') diff --git a/src/property/sshd.lisp b/src/property/sshd.lisp index 96fe568..9fb6f2d 100644 --- a/src/property/sshd.lisp +++ b/src/property/sshd.lisp @@ -64,10 +64,14 @@ The private key is obtained as an item of prerequisite data." (file:host-secret-uploaded (merge-pathnames (strcat "ssh_host_" type "_key") #P"/etc/ssh/"))) -(defun get-host-public-keys (host &key short-hostname (aliases t)) +(defun get-host-public-keys (host &key short-hostname (aliases t) + (ips t) additional-names) (let* ((host (preprocess-host host)) (hostname (get-hostname host)) (short (and short-hostname (list (get-short-hostname host)))) - (aliases (and aliases (get-hostattrs :aliases host)))) - (cons (format nil "~{~A~^,~}" (cons hostname (append aliases short))) + (aliases (and aliases (get-hostattrs :aliases host))) + (ips (and ips (append (get-hostattrs :ipv6 host) + (get-hostattrs :ipv4 host))))) + (cons (format nil "~{~A~^,~}" + (cons hostname (append aliases short ips additional-names))) (mapcar #'cdr (get-hostattrs 'host-public-key host))))) -- cgit v1.2.3