From nobody Tue Mar 11 17:59:43 2025 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 4ZC1k75g53z5qsQ0; Tue, 11 Mar 2025 17:59:43 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZC1k752Jmz3vxv; Tue, 11 Mar 2025 17:59:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1741715983; 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=5903Z+jRL5xIiV6oIcYmoGN/QytfTCF7vraha8B++Ls=; b=P9hxJj33QKcTAF7zJN6/Aq+UXgpRZ6G/sKF7OmyTO1hVP84wNk1yM6OwNpyEBb+eZ413Y5 wjDknAQ4v45+ScayDCiaxX4UHek6/JHamwP5VmJobpFVgWVuHCwEx/fTzO0Ems8lZ7TyQr plmEjtBB4lPjFd+oWHhnrShGuCV0JJ6tjaaxUaIXnJovr6XPsUgaERUvrMs+UckpiFhPdj Y/EqyDjqmVDhqWSiuFxaNDat0ix87dR5pxEUR+S9hivwva2aD7g9YsNFg821TZCCZS0pcn cAunwZqK/QgD1xsTAbpqbBDZRqyv2Vr85XKRc1HAKGYaCR9kSuf2WcWdWaWtSw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1741715983; a=rsa-sha256; cv=none; b=QIs7G5QgaNESeKOm7N+acJrBdSPW54oq7UQZG8/sm/bOd5dvTqLSgxcyd3mCoKF/IW/WEL j1J1XLZoWDPbDbViv4sl2zJ3eg6HcUh44bLW4CC+9zRQsCHnwvDwaPTu+DMBHXl13uoIP4 gZXFgZu1e6kh1NSp/JNeCun3LOVUnjd3YUxnjvtZTV9rVdsZHqmOeSsusG0SWVCcned0zh Vypvk/nLuReQJ38XCFzaQwYMWLGuTxQP2USGsRGTtWY0AShRF/ahOh/BH4afRHN0BoKAmC ySHdZpxyAWoS8bLKx6mhYvdvXq8Wr8+r2HdfUKZdb4GAhwBvQzFM4g71VSU32g== 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=1741715983; 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=5903Z+jRL5xIiV6oIcYmoGN/QytfTCF7vraha8B++Ls=; b=m6MiTZ6yMprCrixqKsqHZb1TSnyt6zadipHMWxjNzCYRJkJX1g0KKGVYi4pcMP4rvclEvN I2jlWJPhNWDj7xnuTz23jaHSJScYISbSnOaRCcRpE8KYqCNqXOh2ZsSjY7NyJ2tr0Sx45y HX8Z4Z/wbHJwaa/pyGOIfiAEdgquWEzsCdiMUkHD36LcFIvwTJRf8Rxma4RoFX8exYbuxc IEyh6SqK3qNGlInPfKeadvKvvX34VCXLa1dknwFy3gmJfDVEQHpJA7Gcbvbpdt1sah5mi+ EMLERMKjtMvShbOse5cOm+J1ntK5i2CADCUBv3nBiOkTzFU6gzcQ+T6DH9Ax6g== 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 4ZC1k74B8wzchm; Tue, 11 Mar 2025 17:59:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 52BHxhOD061431; Tue, 11 Mar 2025 17:59:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52BHxh52061428; Tue, 11 Mar 2025 17:59:43 GMT (envelope-from git) Date: Tue, 11 Mar 2025 17:59:43 GMT Message-Id: <202503111759.52BHxh52061428@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 067cf605f884 - stable/13 - Revert "ntpd: Use the ntpd -u option in preference to the rc su plumbing" 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 067cf605f884d888fd269ca269d9dda3b66a8787 Auto-Submitted: auto-generated The branch stable/13 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=067cf605f884d888fd269ca269d9dda3b66a8787 commit 067cf605f884d888fd269ca269d9dda3b66a8787 Author: Cy Schubert AuthorDate: 2025-03-11 17:51:11 +0000 Commit: Cy Schubert CommitDate: 2025-03-11 17:59:36 +0000 Revert "ntpd: Use the ntpd -u option in preference to the rc su plumbing" Using the ntpd -u option to set the credentials ntpd is to run under while still using rc(8) to invoke causes some FreeBSD installs to fail to load mac_ntp. The fact that that can_run_nonroot() does not indicate why failures occur leaves people on the mailing lists guessing as to why there are failures. Let's revert back to using the rc(8) provided su. The ntpd rc script will be rewritten when the ntpd chroot will be implemented. Reported on: freebsd-stable@ This reverts commit 521f66715afb312b356afafc68cbc044a436a753. (cherry picked from commit 5ca7754519e8c618968d8acbf54d653b6e968829) --- libexec/rc/rc.d/ntpd | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/libexec/rc/rc.d/ntpd b/libexec/rc/rc.d/ntpd index 36df4ae08c96..76d83149ae1a 100755 --- a/libexec/rc/rc.d/ntpd +++ b/libexec/rc/rc.d/ntpd @@ -98,6 +98,7 @@ ntpd_precmd() # by the admin, we don't add the option. If the file exists in the old # default location we use that, else we use the new default location. if can_run_nonroot; then + _user="ntpd" driftopt="-f ${_ntp_default_driftfile}" elif grep -q "^[ \t]*driftfile" "${ntpd_config}" || [ -n "${rc_flags}" ] && @@ -111,13 +112,7 @@ ntpd_precmd() fi # Set command_args based on the various config vars. - command_args="-p ${pidfile} -c ${ntpd_config} ${driftopt} -u ${ntpd_user:=ntpd:ntpd}" - - # Unset ntpd_user because rc.subr uses $${name}_user to determine - # whether to invoke su(1) to setuid() to $ntpd_user for us. We want - # ntpd to do the setuid() itself through the -u argument, above. - unset ntpd_user - + command_args="-p ${pidfile} -c ${ntpd_config} ${driftopt}" if checkyesno ntpd_sync_on_start; then command_args="${command_args} -g" fi