Bug#959726: [PATCH] Check sshd_config.d/* for HostKey in postinst

Dmitry Borodaenko <[email protected]>
Newsgroups gmane.linux.debian.devel.ssh
Message-ID <20201106042630.548897-1-angdraug__23222.1944535681$1604637032$gmane$org@debian.org>
If you can safely assume that /etc/ssh/sshd_config.d exists you can simply add
it to the list of files scanned for HostKey.

---
 debian/openssh-server.postinst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/debian/openssh-server.postinst b/debian/openssh-server.postinst
index f45f5851c..aa4bee899 100644
--- a/debian/openssh-server.postinst
+++ b/debian/openssh-server.postinst
@@ -18,7 +18,7 @@ get_config_option() {
 	perl -lne '
 		s/[[:space:]]+/ /g; s/[[:space:]]+$//;
 		print if s/^[[:space:]]*'"$option"'[[:space:]=]+//i' \
-	   /etc/ssh/sshd_config
+	   /etc/ssh/sshd_config /etc/ssh/sshd_config.d/*
 }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.