From nobody Thu Sep 21 14:39: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 4Rryhy57hpz4tVFj; Thu, 21 Sep 2023 14:39: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 4Rryhy4ct5z4Fxh; Thu, 21 Sep 2023 14:39:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695307170; 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=1+l3rUUTHsulwH93ZpODO7HMThEpVLOoFOgVxQ31BFU=; b=Slbe+Bs5hYt6WBplFesFyNblhbpG3CcIKigYlQa8AF10Yea8Ph2UY2MHMCaBN0ydlSx4X7 GrQr9jF9aqws1BWCnDu3Q2KDET+m3nlGSQ5sKJ39Gt8OregXbFPBfk7dLJYQ5gpzZVmj/q Tr014WVixLKop6bzsoYn/WLg4+c5KDGsSUyBsOr8ga/5P2a2ClIM7nA0EFVgtVCkm7mvnf DQ0h5ntRuDQ91/x8hbCnDFVWTDxVqSuYDlOSChg7PiM++/IoWImlwR1mwWogZayZyqWoQ/ g9g1gwZv3CZBqO3ouJ1VxTSdfCQ0+sk/6/Gyn5prWZUCgrkcErMCJrO2k3j3Kg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695307170; a=rsa-sha256; cv=none; b=BvjdEOqvaRRcw6XZTVk2hzaE1w6vt3U5rVn9uSZh78bASYMb12Mv7tVWee/X9o80H+66FQ M+ZIV1wk44bR4/+/J5ANwwDM763nkc5OffO9R0rhVlOCT6lZrLsEyUa8FS+Y3thiku3513 gky2kr9U4QUHZNxUv3n4HYcTdXyBcCv3hWAF4bEmtSVa66PjJvMC5Ge5VTEdMppS6Ud9et InGfwBl0NT04wZxchavxRencQA+LD6L2D7AWIn2DKKjrsfOIujboS2+PWbhKJ3HXeWcObH HAuT2swFctBpc/qVFHg2vZibHwi8lBa7WQ67EbU+3LGd1SE+FaHodDehDLbUDg== 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=1695307170; 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=1+l3rUUTHsulwH93ZpODO7HMThEpVLOoFOgVxQ31BFU=; b=FfJ5zU45Oirz0wV3w1OIanDaq7SXSOcFJWIYjJNFlv25NIVp50G1FtnIA27rY3Jv8s3hku noaN/2Mg30QkkdzEUCJqlvXEn1PkjtqhZ4jReyaQ1cW/uWTskDsXJW81jdNfwyindR1Wsj mpcv3cspHsqC/0VgsT/YtpO2t1TXihtV1zz6e9577WixGEq/Zz8MKZU58+7iArifvYp+tR Ym7vB6YFok4+qEbTmsthpVwjRthC4o2b8CkWgj5lTUsS7ffBUnnWiNeiK3SRhSds4vM/6W lPj6oeSKJyuqkH9wwMwFgLZxMmF7g0SIP/cdVOzASwmDPWWv2ZuPNyfygcGyAg== 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 4Rryhy3Q56zjRq; Thu, 21 Sep 2023 14:39: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 38LEdUlu007031; Thu, 21 Sep 2023 14:39:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38LEdUqW007028; Thu, 21 Sep 2023 14:39:30 GMT (envelope-from git) Date: Thu, 21 Sep 2023 14:39:30 GMT Message-Id: <202309211439.38LEdUqW007028@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: cce342e21357 - stable/14 - 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/stable/14 X-Git-Reftype: branch X-Git-Commit: cce342e21357833892083e865710c4a05603b7b5 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=cce342e21357833892083e865710c4a05603b7b5 commit cce342e21357833892083e865710c4a05603b7b5 Author: Ed Maste AuthorDate: 2023-09-16 20:46:16 +0000 Commit: Ed Maste CommitDate: 2023-09-21 14:38:48 +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 MFC after: 3 days 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) --- 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