From nobody Sat Sep 23 13:09:30 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rt8cB3RKtz4tdn3; Sat, 23 Sep 2023 13:09:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rt8cB2r5tz3Yc9; Sat, 23 Sep 2023 13:09:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695474570; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3Lq/qY2TlP4QAL3HwWmX40QQ3Hf0Hn7YLmGORyyskO0=; b=X6HdCwPKjzBe8VwMxDPLR3HygUaGi6IkVw+bOVgnL+NxStv63V+spa9y4vSQyiZyySY3n8 gZjT+ev8O8JcBN7ajiUiL3wFrKA859imKO0lTyxTUHvdhD+N7L7ifg6ttIc+IxmkLQLNXE kDHSpH/9tJkvPOZhR2Jd/mzcIOfaEEJr/6zatR+aOzFOGMWPNgbtMg2OoZbgxbf26kqPsM knee/dZB3WwG68YDe+v8fkqIQfDHsEvEBGSN9r+q/Oypq/0V6OH84EvrxceQB2aAFnodgH IB2YoEyihVYatHSXvdNcoDzl9jehFTcXMrg6BPxHbws56/0WnqHAevuk2g9REA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695474570; a=rsa-sha256; cv=none; b=jT+ChFc52Fw+ndS+Y2+HdrJQbrroQIjUaadZvjzxvyaRjgYZYfchUv35HEWbu/Pvgrwn2i v11W6snzipCN6w69DhxphtMNuLcHgqwuUEZLDzP3H/BMvqSjTYviLpWw819xFM2ZEkicnV PL5B937PvHlOUxN7dsTW5JwInKrREdGu8Y5V8zPMcv8Jmq7M/27RfMxjc2wTJtfJSjdO62 xm/6ZTBEE2lKX3Ph8RHuzeLYPF2fDd8cDk4ifPB6hi5pvWaZZ611WOH8pa+8QeyVw/ufM8 4tSOLrY/NVW5gLv4ZjQWevF6kGwtRbkjl1k6y0ytmw5cwkX7IxhrHEUojdLRow== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695474570; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3Lq/qY2TlP4QAL3HwWmX40QQ3Hf0Hn7YLmGORyyskO0=; b=usf7zNV3I2gdirCAfcVGa24yhWMDVgikz+LQZ+IigGjtZaBYb39Ny0ES2Vb9NVjnN9o11n MzTjwSfaAReU9qLd6kEEuKGH6OzyR4j3jK1hxm60K3vIVq6ObAEkYVw5bI742OYbY3kKoM rjRAyK1lB+U4H3xe6lrme5j0fyGmEDhLQ34iNWefbDX7UG1UEJuG6qqUhu4Dvl6tdpXuT9 XePqEYGQMYHNUxdIJRseFZfTOhobpb9K3TpKYRLfS+/KEsJ3RzVnHqd08xyHawsQuyNE4F lFEtsXXpFzYuo7xotQF4CyHE1yRmCydby7dwKw2nka630umDjuYKV27WEXSyTQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rt8cB1mzFz14vV; Sat, 23 Sep 2023 13:09:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38ND9UZD073821; Sat, 23 Sep 2023 13:09:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38ND9UG6073818; Sat, 23 Sep 2023 13:09:30 GMT (envelope-from git) Date: Sat, 23 Sep 2023 13:09:30 GMT Message-Id: <202309231309.38ND9UG6073818@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 78534afbcab6 - releng/14.0 - freebsd-update: do not restart sshd when updating jail/basedir List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 78534afbcab6e97565c06041fecfe28587e13f2b Auto-Submitted: auto-generated The branch releng/14.0 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=78534afbcab6e97565c06041fecfe28587e13f2b commit 78534afbcab6e97565c06041fecfe28587e13f2b Author: Ed Maste AuthorDate: 2023-09-16 20:46:16 +0000 Commit: Ed Maste CommitDate: 2023-09-23 13:08:37 +0000 freebsd-update: do not restart sshd when updating jail/basedir In 6cd1bc531609 for PR 263489 I changed freebsd-update to restart sshd after upgrade, to avoid an upgrade-related incompatibility that made it impossible to login. This is intended to avoid losing access to remote hosts, and ought not apply to upgrading jails (from outside). PR: 263489, 272282 Reported by: otis Reviewed by: otis, kevans Sponsored by: The FreeBSD Foundation Fixes: 6cd1bc531609 ("freebsd-update: restart sshd after upgrade") Differential Revision: https://reviews.freebsd.org/D41890 (cherry picked from commit 8ee97b1928e75f7f81a870ffb063010778e0a129) (cherry picked from commit cce342e21357833892083e865710c4a05603b7b5) Approved by: re (gjb) --- usr.sbin/freebsd-update/freebsd-update.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/usr.sbin/freebsd-update/freebsd-update.sh b/usr.sbin/freebsd-update/freebsd-update.sh index 57023557839b..9cdff05c24e4 100644 --- a/usr.sbin/freebsd-update/freebsd-update.sh +++ b/usr.sbin/freebsd-update/freebsd-update.sh @@ -3036,9 +3036,10 @@ Kernel updates have been installed. Please reboot and run install_from_index INDEX-NEW || return 1 install_delete INDEX-OLD INDEX-NEW || return 1 - # Restart sshd if running (PR263489). Note that this does not - # affect child sshd processes handling existing sessions. - if service sshd status >/dev/null 2>/dev/null; then + # Restart host sshd if running (PR263489). Note that this does + # not affect child sshd processes handling existing sessions. + if [ "$BASEDIR" = / ] && \ + service sshd status >/dev/null 2>/dev/null; then echo echo "Restarting sshd after upgrade" service sshd restart