mirror of
https://git.yoctoproject.org/poky
synced 2026-06-01 00:59:48 +00:00
image.bbclass: improve sed expressions for ssh_allow_empty_password()
The sed expression was also replacing documentation text containing PermitRootLogin in the line so "PermitRootLogin yes" was specified twice. (From OE-Core rev: 0572196158d9505a624bdee71760978f284728b0) Signed-off-by: Jonathan Liu <net147@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
db80f796e7
commit
b24f5e8252
@@ -285,8 +285,8 @@ zap_empty_root_password () {
|
|||||||
# allow dropbear/openssh to accept root logins and logins from accounts with an empty password string
|
# allow dropbear/openssh to accept root logins and logins from accounts with an empty password string
|
||||||
ssh_allow_empty_password () {
|
ssh_allow_empty_password () {
|
||||||
if [ -e ${IMAGE_ROOTFS}${sysconfdir}/ssh/sshd_config ]; then
|
if [ -e ${IMAGE_ROOTFS}${sysconfdir}/ssh/sshd_config ]; then
|
||||||
sed -i 's#.*PermitRootLogin.*#PermitRootLogin yes#' ${IMAGE_ROOTFS}${sysconfdir}/ssh/sshd_config
|
sed -i 's/^[#[:space:]]*PermitRootLogin.*/PermitRootLogin yes/' ${IMAGE_ROOTFS}${sysconfdir}/ssh/sshd_config
|
||||||
sed -i 's#.*PermitEmptyPasswords.*#PermitEmptyPasswords yes#' ${IMAGE_ROOTFS}${sysconfdir}/ssh/sshd_config
|
sed -i 's/^[#[:space:]]*PermitEmptyPasswords.*/PermitEmptyPasswords yes/' ${IMAGE_ROOTFS}${sysconfdir}/ssh/sshd_config
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -e ${IMAGE_ROOTFS}${sbindir}/dropbear ] ; then
|
if [ -e ${IMAGE_ROOTFS}${sbindir}/dropbear ] ; then
|
||||||
|
|||||||
Reference in New Issue
Block a user