diff options
Diffstat (limited to 'meta/classes/image.bbclass')
-rw-r--r-- | meta/classes/image.bbclass | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass index 29309f55cb..ea035fe144 100644 --- a/meta/classes/image.bbclass +++ b/meta/classes/image.bbclass @@ -304,6 +304,16 @@ ssh_allow_empty_password () { fi } +# Disable DNS lookups, the SSH_DISABLE_DNS_LOOKUP can be overridden to allow +# distros to choose not to take this change +SSH_DISABLE_DNS_LOOKUP ?= " ssh_disable_dns_lookup ; " +ROOTFS_POSTPROCESS_COMMAND_append_qemuall = "${SSH_DISABLE_DNS_LOOKUP}" +ssh_disable_dns_lookup () { + if [ -e ${IMAGE_ROOTFS}${sysconfdir}/ssh/sshd_config ]; then + sed -i -e 's:#UseDNS yes:UseDNS no:' ${IMAGE_ROOTFS}${sysconfdir}/ssh/sshd_config + fi +} + # Enable postinst logging if debug-tweaks is enabled postinst_enable_logging () { mkdir -p ${IMAGE_ROOTFS}${sysconfdir}/default |