aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--recipes-installer/anaconda/files/0072-fix-sshd-config.patch38
-rw-r--r--recipes-installer/anaconda/files/81-add-env-file-for-sshd.ks3
-rwxr-xr-xrecipes-installer/anaconda/python3-anaconda_32.24.7.bb3
3 files changed, 44 insertions, 0 deletions
diff --git a/recipes-installer/anaconda/files/0072-fix-sshd-config.patch b/recipes-installer/anaconda/files/0072-fix-sshd-config.patch
new file mode 100644
index 0000000..48f3234
--- /dev/null
+++ b/recipes-installer/anaconda/files/0072-fix-sshd-config.patch
@@ -0,0 +1,38 @@
+The default config files are located in /etc/default in oe-core. Update to make
+the checkbox 'Allow root SSH login with password' work.
+
+Upstream-Status: Inappropriate [oe specific]
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+---
+ pyanaconda/modules/users/installation.py | 10 ++++++++--
+ 1 file changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/pyanaconda/modules/users/installation.py b/pyanaconda/modules/users/installation.py
+index ab27780c91..55bfb6eb53 100644
+--- a/pyanaconda/modules/users/installation.py
++++ b/pyanaconda/modules/users/installation.py
+@@ -169,7 +169,7 @@ class SetSshKeysTask(Task):
+ class ConfigureRootPasswordSSHLoginTask(Task):
+ """Optionally add an override allowing root to login with password over SSH."""
+
+- CONFIG_PATH = "etc/sysconfig/sshd-permitrootlogin"
++ CONFIG_PATH = "etc/default/sshd-permitrootlogin"
+
+ def __init__(self, sysroot, password_allowed):
+ """Create a new root password SSH login configuration task.
+@@ -195,7 +195,13 @@ class ConfigureRootPasswordSSHLoginTask(Task):
+ f.write(
+ '# This file has been generated by the Anaconda Installer.\n'
+ '# Allow root to log in using ssh. Remove this file to opt-out.\n'
+- 'PERMITROOTLOGIN="-oPermitRootLogin=yes"\n'
++ 'SSHD_OPTS="-oPermitRootLogin=yes"\n'
+ )
+ else:
+ log.debug("Not adding an override allowing root login with password via SSH.")
++ with open(os.path.join(self._sysroot, self.CONFIG_PATH), "wt") as f:
++ f.write(
++ '# This file has been generated by the Anaconda Installer.\n'
++ '# Disallow root to log in using ssh. Remove this file to opt-out.\n'
++ 'SSHD_OPTS="-oPermitRootLogin=no"\n'
++ )
diff --git a/recipes-installer/anaconda/files/81-add-env-file-for-sshd.ks b/recipes-installer/anaconda/files/81-add-env-file-for-sshd.ks
new file mode 100644
index 0000000..5b6d382
--- /dev/null
+++ b/recipes-installer/anaconda/files/81-add-env-file-for-sshd.ks
@@ -0,0 +1,3 @@
+%post
+sed -i '/^ExecStart=/iEnvironmentFile=-/etc/default/sshd-permitrootlogin' /lib/systemd/system/sshd@.service
+%end
diff --git a/recipes-installer/anaconda/python3-anaconda_32.24.7.bb b/recipes-installer/anaconda/python3-anaconda_32.24.7.bb
index 3acc698..bf2e807 100755
--- a/recipes-installer/anaconda/python3-anaconda_32.24.7.bb
+++ b/recipes-installer/anaconda/python3-anaconda_32.24.7.bb
@@ -50,6 +50,7 @@ RDEPENDS_${PN} += "networkmanager \
SRC_URI = "git://github.com/rhinstaller/anaconda;protocol=https;branch=f32-release \
file://81-edit-sudoers.ks \
file://81-systemd-preset-all.ks \
+ file://81-add-env-file-for-sshd.ks \
file://0001-do-not-build-po-and-doc.patch \
file://0002-do-not-load-the-system-wide-Xresources.patch \
file://0003-tweak-iso-mount-dir-and-kernel-name.patch \
@@ -114,6 +115,7 @@ SRC_URI = "git://github.com/rhinstaller/anaconda;protocol=https;branch=f32-relea
file://0001-limit-product-name-less-then-30-chars.patch \
file://0070-remove-unsupported-icon-from-main-page-and-tweak-ico.patch \
file://0071-disable-payloads-flatpak-ostree.patch \
+ file://0072-fix-sshd-config.patch \
"
SRCREV = "efe96d7a05431afd12fd4d92dcdfd5d6cc134cea"
@@ -145,6 +147,7 @@ do_configure_prepend() {
do_install_append() {
install -m 644 ${WORKDIR}/81-edit-sudoers.ks ${D}${datadir}/anaconda/post-scripts
install -m 644 ${WORKDIR}/81-systemd-preset-all.ks ${D}${datadir}/anaconda/post-scripts
+ install -m 644 ${WORKDIR}/81-add-env-file-for-sshd.ks ${D}${datadir}/anaconda/post-scripts
install -m 644 ${S}/widgets/src/resources/*.svg ${D}${datadir}/anaconda/pixmaps
install -m 644 ${S}/widgets/src/resources/*.png ${D}${datadir}/anaconda/pixmaps
}