commit:     ca8ec7382a0b8c06b9bd3b69e5d7a791e0fa8915
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 15 02:20:21 2022 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Thu Nov 17 23:41:05 2022 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=ca8ec738

targets: Fix enabling PermitRootLogin

The default changed to "prohibit-password" many moons ago, so our ISOs
would not have allowed root logins if not for net-misc/openssh's
IUSE=livecd, which handles this in the ebuild.

Let's go ahead and fix it, so that we can consider removing openssh's
livecd USE flag which would allow us to avoid rebuilding the package for
the ISO.

Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 targets/support/livecdfs-update.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/targets/support/livecdfs-update.sh 
b/targets/support/livecdfs-update.sh
index b7ead552..3f47012b 100755
--- a/targets/support/livecdfs-update.sh
+++ b/targets/support/livecdfs-update.sh
@@ -7,7 +7,8 @@ source /tmp/chroot-functions.sh
 # Allow root logins to our CD by default
 if [ -e /etc/ssh/sshd_config ]
 then
-       sed -i 's:^#PermitRootLogin\ yes:PermitRootLogin\ yes:' \
+       sed -i \
+               -e '/^#PermitRootLogin/c# Allow root login with password on 
livecds.\nPermitRootLogin Yes' \
                /etc/ssh/sshd_config
 fi
 

Reply via email to