main/openssh: sshd.pam and sshd.krb5 binary selection logic doesn't check sshd_config.d/*
With 3903cd46 , users can decide to put the UsePAM yes
directive in /etc/ssh/sshd_config.d/whatever.conf
instead of /etc/ssh/sshd_config
. However /etc/init.d/sshd
only looks in the latter so it ends up launching the default sshd that doesn't have PAM support. This is easily noticeable from the resuling log:
auth.info sshd[9310]: /etc/ssh/sshd_config.d/99-overrides.conf line 9: Unsupported option UsePAM
The get_conf
function there needs to be changed to consider all files in the directory too, following the same logic openssh uses for Include
(multiple files are processed in lexical order, last directive wins).