[oe-commits] Saul Wold : core-image: allow root login when debug-tweaks is enabled

git at git.openembedded.org git at git.openembedded.org
Mon Sep 10 12:08:46 UTC 2012


Module: openembedded-core.git
Branch: master
Commit: 13e6aa8bba6ab1ebba1efa23f94af379a8fcb6a9
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=13e6aa8bba6ab1ebba1efa23f94af379a8fcb6a9

Author: Saul Wold <sgw at linux.intel.com>
Date:   Fri Sep  7 15:18:36 2012 -0700

core-image: allow root login when debug-tweaks is enabled

This allows root to login over ssh with an empty password just like
dropbear when the debug-tweaks are enabled, it's important to disable
debug-tweaks for a production system as this will leave open a security
hole!

Thanks to Marc for the settings.
Cc: Marc Ferland <marc.ferland at gmail.com>

[Yocto #3078]

Signed-off-by: Saul Wold <sgw at linux.intel.com>

---

 meta/classes/image.bbclass |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 2e95556..9af67e7 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -369,6 +369,7 @@ zap_root_password () {
 # allow openssh accept login with empty password string
 openssh_allow_empty_password () {
 	if [ -e ${IMAGE_ROOTFS}${sysconfdir}/ssh/sshd_config ]; then
+		sed -i 's#.*PermitRootLogin.*#PermitRootLogin yes#' ${IMAGE_ROOTFS}${sysconfdir}/ssh/sshd_config
 		sed -i 's#.*PermitEmptyPasswords.*#PermitEmptyPasswords yes#' ${IMAGE_ROOTFS}${sysconfdir}/ssh/sshd_config
 	fi
 }





More information about the Openembedded-commits mailing list