[OE-core] [PATCH] image.bbclass: Catch readonly sshd config in ssh_allow_empty_password.
Philip Tricca
flihp at twobit.us
Sat Jan 3 23:52:10 UTC 2015
The ssh_allow_empty_password function modifies the standard sshd_config
file but not sshd_config_readonly. This patch uses a simple shell wildcard
to catch all openssh server config files so long as they're in /etc/ssh
and are named with the sshd_config prefix.
Signed-off-by: Philip Tricca <flihp at twobit.us>
---
meta/classes/image.bbclass | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 07e7f99..80c90f6 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -323,8 +323,8 @@ zap_empty_root_password () {
# allow dropbear/openssh to accept root logins and logins from accounts with an empty password string
ssh_allow_empty_password () {
if [ -e ${IMAGE_ROOTFS}${sysconfdir}/ssh/sshd_config ]; then
- sed -i 's/^[#[:space:]]*PermitRootLogin.*/PermitRootLogin yes/' ${IMAGE_ROOTFS}${sysconfdir}/ssh/sshd_config
- sed -i 's/^[#[:space:]]*PermitEmptyPasswords.*/PermitEmptyPasswords yes/' ${IMAGE_ROOTFS}${sysconfdir}/ssh/sshd_config
+ sed -i 's/^[#[:space:]]*PermitRootLogin.*/PermitRootLogin yes/' ${IMAGE_ROOTFS}${sysconfdir}/ssh/sshd_config*
+ sed -i 's/^[#[:space:]]*PermitEmptyPasswords.*/PermitEmptyPasswords yes/' ${IMAGE_ROOTFS}${sysconfdir}/ssh/sshd_config*
fi
if [ -e ${IMAGE_ROOTFS}${sbindir}/dropbear ] ; then
--
1.7.10.4
More information about the Openembedded-core
mailing list