From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1457605-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id BF976158020
	for <garchives@archives.gentoo.org>; Thu, 17 Nov 2022 23:42:42 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 5E334E0923;
	Thu, 17 Nov 2022 23:42:41 +0000 (UTC)
Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 41025E0923
	for <gentoo-commits@lists.gentoo.org>; Thu, 17 Nov 2022 23:42:41 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 47896340FD0
	for <gentoo-commits@lists.gentoo.org>; Thu, 17 Nov 2022 23:42:40 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 84B463A5
	for <gentoo-commits@lists.gentoo.org>; Thu, 17 Nov 2022 23:42:38 +0000 (UTC)
From: "Matt Turner" <mattst88@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Matt Turner" <mattst88@gentoo.org>
Message-ID: <1668728465.ca8ec7382a0b8c06b9bd3b69e5d7a791e0fa8915.mattst88@gentoo>
Subject: [gentoo-commits] proj/catalyst:master commit in: targets/support/
X-VCS-Repository: proj/catalyst
X-VCS-Files: targets/support/livecdfs-update.sh
X-VCS-Directories: targets/support/
X-VCS-Committer: mattst88
X-VCS-Committer-Name: Matt Turner
X-VCS-Revision: ca8ec7382a0b8c06b9bd3b69e5d7a791e0fa8915
X-VCS-Branch: master
Date: Thu, 17 Nov 2022 23:42:38 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: 8c5c817c-7f0c-4aca-af88-09978a05a8cb
X-Archives-Hash: 15cf1368c1612b54bd100b64164c7b95
Message-ID: <20221117234238.4dHV6My1OEzBGa4Z-ej0YJsmOJSNr1V49_BHyhA2X6o@z>

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