From nobody Thu Sep 21 14:40:48 2023 X-Original-To: dev-commits-src-all@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 4RrykT1Q3dz4tVWt; Thu, 21 Sep 2023 14:40:49 +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 4RrykT0vHzz4G9H; Thu, 21 Sep 2023 14:40:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695307249; 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=bpXQRYnj1Xes1zeqzXaWFQwDkTg68XQPH+iOkyo4nVw=; b=QJq0Zp+VA/0vUgui8K6070uaugQg8it74KT7/VhTMUX72D77+G6lQ/+ir3ZFOVFk6zPf4N Onqd41L4c5rmjPxZfi1jff3zdl5Q7HFsY1mw6ZTPKsrJtpnmhrRUDCQ8omYk7SKgNVj17R Fj9XwdAAhtQX+KIl7hLcjZveSU/jCLfh0r1mdXpAqxAnuVe5bK42m4djCowV6DVEC7hUjB pPRjy0NMEzMdnM2gLkyHlQUHancNMAnNkkApgwWPaZ+KX65zPVK2flRsjVVOdQFyJBxktT pch3qyZn5o3ier2ztK+vqd2acI4gfB9ecBuI+l7Pk4LnAVTwPPcuOZNXLZlufg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695307249; a=rsa-sha256; cv=none; b=u1BOM5DD9FF823WlqoyW2B3ScXjcWwxK65zW9Z8xO1Tqfl3JF3DSovk1wMkQe9beqUzw3S 64ZCeohwLRIwEtPDe/4TfyJC022FVGxyhT0VsoEHVngsXVy/K2V8LmspQcPAcPdrS3HRas 5PGMkCbTHD3Ys/2UGcDSbfOWAc625oiqsU/DfoPV9Cw0f7tQ9DasVXQSAuBtB6WtFe7IfN YovAmqNy2j3qUR8qj3vMBkqzkFV9TkJ2Q2xjvIAwC3WPtBABDkuoFe9Tjhy5i7Sz6xKIti G6OcfYpohfuuWHz+sektmk/Li1WO27pJXSRR51MgPGMOTqHS8p0XwXChUAGT8g== 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=1695307249; 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=bpXQRYnj1Xes1zeqzXaWFQwDkTg68XQPH+iOkyo4nVw=; b=L+u+0GfsRg3Qmg3wzIz0J6eGYo78i3k+GzxOv3BOcNmvOmq394OdaYYh1KyNpMC5sqASMc tB2JRch9VylqMZ66i6PnbRixEOKz7Kw+qMMjSBpsPGvHENJl5zk9hhyMyGUENinxXrmy7P 97D8tfbUSV1jYrIBwm1kc0dpFxXndn+IoXKx2QfOnpT2KkV2RRmjLfbbDwD73qY4y4X4WG y74WQJsx6UUPLXZp7x4X1kW2MCyAmDOj9DNOY0JX1Uz4sGWlcSN/btmERkHnxLNyxrlinE XGP/6o/QndlLjoOsM91u6FNtD6mGPAmAf7jWf4Bi89WZOhylRWp7kt3w4oGWpA== 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 4RrykT009LzjGM; Thu, 21 Sep 2023 14:40:48 +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 38LEemJO015844; Thu, 21 Sep 2023 14:40:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38LEemI8015841; Thu, 21 Sep 2023 14:40:48 GMT (envelope-from git) Date: Thu, 21 Sep 2023 14:40:48 GMT Message-Id: <202309211440.38LEemI8015841@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: 877d15d57931 - stable/13 - freebsd-update: do not restart sshd when updating jail/basedir List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/13 X-Git-Reftype: branch X-Git-Commit: 877d15d57931350dcde264de1dabe7fccf769388 Auto-Submitted: auto-generated The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=877d15d57931350dcde264de1dabe7fccf769388 commit 877d15d57931350dcde264de1dabe7fccf769388 Author: Ed Maste AuthorDate: 2023-09-16 20:46:16 +0000 Commit: Ed Maste CommitDate: 2023-09-21 14:40:03 +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) (cherry picked from commit cce342e21357833892083e865710c4a05603b7b5) --- 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