summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorAndré Draszik <adraszik@tycoint.com>2017-06-09 14:38:14 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-06-12 15:08:31 +0100
commit00e83cb02954b61ecfa9f30f6779ec323b95197c (patch)
treef856ad642bb64bddea129e859437d316086bda26 /meta/classes
parentbd2b33486e647c6e7f1351270d5bca4d300d18b5 (diff)
downloadpoky-00e83cb02954b61ecfa9f30f6779ec323b95197c.tar.gz
openssh: allow to override OpenSSL HostKeys when read-only-rootfs
With these changes it is possible to have a .bbappend that - sets SYSCONFDIR to some persistent storage - modifies SYSCONFDIR/sshd_config to use ssh host keys from the (writable) sysconfdir (From OE-Core rev: 106b59d9f96f70d133fa1421091ad280d27a5b6a) Signed-off-by: André Draszik <adraszik@tycoint.com> Reviewed-by: Stephane Ayotte <sayotte@tycoint.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/rootfs-postcommands.bbclass4
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/classes/rootfs-postcommands.bbclass b/meta/classes/rootfs-postcommands.bbclass
index 1d66a42953..78f7c55933 100644
--- a/meta/classes/rootfs-postcommands.bbclass
+++ b/meta/classes/rootfs-postcommands.bbclass
@@ -93,10 +93,10 @@ read_only_rootfs_hook () {
93 # and the keys under /var/run/ssh. 93 # and the keys under /var/run/ssh.
94 if [ -d ${IMAGE_ROOTFS}/etc/ssh ]; then 94 if [ -d ${IMAGE_ROOTFS}/etc/ssh ]; then
95 if [ -e ${IMAGE_ROOTFS}/etc/ssh/ssh_host_rsa_key ]; then 95 if [ -e ${IMAGE_ROOTFS}/etc/ssh/ssh_host_rsa_key ]; then
96 echo "SYSCONFDIR=/etc/ssh" >> ${IMAGE_ROOTFS}/etc/default/ssh 96 echo "SYSCONFDIR=\${SYSCONFDIR:-/etc/ssh}" >> ${IMAGE_ROOTFS}/etc/default/ssh
97 echo "SSHD_OPTS=" >> ${IMAGE_ROOTFS}/etc/default/ssh 97 echo "SSHD_OPTS=" >> ${IMAGE_ROOTFS}/etc/default/ssh
98 else 98 else
99 echo "SYSCONFDIR=/var/run/ssh" >> ${IMAGE_ROOTFS}/etc/default/ssh 99 echo "SYSCONFDIR=\${SYSCONFDIR:-/var/run/ssh}" >> ${IMAGE_ROOTFS}/etc/default/ssh
100 echo "SSHD_OPTS='-f /etc/ssh/sshd_config_readonly'" >> ${IMAGE_ROOTFS}/etc/default/ssh 100 echo "SSHD_OPTS='-f /etc/ssh/sshd_config_readonly'" >> ${IMAGE_ROOTFS}/etc/default/ssh
101 fi 101 fi
102 fi 102 fi