From nobody Tue Mar 11 17:57:54 2025 X-Original-To: dev-commits-src-main@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 4ZC1h31Wqyz5qsN3; Tue, 11 Mar 2025 17:57:55 +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 4ZC1h26QG9z3vRh; Tue, 11 Mar 2025 17:57:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1741715874; 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=aGAwxSlFXBt2Fg3hhAMgyIXZMcj+QZuZrtvz8HXcNrI=; b=OiE1CjZUffwqzD6fwhbZWeNIoltru4ZwtZ5uY4KCq5hTR/3ec3aPrJzMg9p/tbriRw0nQM mMVYolEl5glnoQO2wQE6r0MOc9lm5UxXI9Q3D/oS01j2En65Wrh248mQG75+ZYDTt7BcHL 4/J3i6SV9mVxejicy3ZffZw3F/Lq0BbBt8OyJzzex/YHi+Az6DJeqaSY0A0BUtEth5iQud RlPd0T70aOkGWHU2AG7QF9H+k7qtw4gpf3g8MeH4Q3Vs2wUD8yDyKF3+tBBNJFsFAMET4y 0ViJQGbvUiYP8Xd6a8gfeKP1b8BvNq4uN48RUjhTws/XbSdmcObNLf2QdO7qHg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1741715874; a=rsa-sha256; cv=none; b=smT/M9vpy9OUqoyEyVUC2Mrz/3O5/lD1sEJtCcBm4zm8ihRTW5F3iTKjMUKcRdddYpzKet TNvQBOwvIXPqO5MkFKBENvIf9RjsDjYZKSMw5C1tgIiUTzXIZrcXvoHHuSSaaTRqkBBquL PUDRgY7EMwUBlqWfsAVXn23QrK+uWdSx/fQR4i8R2L+ulB/CGUEHdsJc16gS3ozimrrwVM CFDd5I3BQwZuaqa8UI8pGOavqO2p6/+ymnzRgl+RyJ5X5F/rORKPaXAlB3GXBt51+Fhz0t VzP8ErmpbgpuL+iv1WzaSiMoG9e74QA1Tcna1hA57otkwLaToasXS76RPk/NDw== 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=1741715874; 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=aGAwxSlFXBt2Fg3hhAMgyIXZMcj+QZuZrtvz8HXcNrI=; b=Y890IFG5Xa43XBsJtVJSVHhZLWxvdBdER9CvG3HcSv5T1Z8TNd2VmlmcfBBVSCBzoCu9q6 vqN7AEIKYx6+1sKzcnCBBwsB3FRbglQ2s8z2HAlSyJxTBDT8g6qS4Y92YTmiVbMm2yg2Qu jXqIYpVHgGP9Jnosrw01NQfkZDLijcArNTbtQ6GHJnapDHBRIP1+afQ+FCN9LNKvbrXYMD owKW3wtsAFxaZDAEL0OXVcNCu05PQTW4gw67/FJN/SKgfZqLEABkkyVVCi2EmDca5iAmQA R6Q1IvNl4tUPDWxWoDberyxhnh1XUWmq6eAShp0j8zwevRo1znDNvq7X6F4zFw== 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 4ZC1h25jgczcjt; Tue, 11 Mar 2025 17:57:54 +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 52BHvsYO060687; Tue, 11 Mar 2025 17:57:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52BHvsSU060684; Tue, 11 Mar 2025 17:57:54 GMT (envelope-from git) Date: Tue, 11 Mar 2025 17:57:54 GMT Message-Id: <202503111757.52BHvsSU060684@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: 5ca7754519e8 - main - Revert "ntpd: Use the ntpd -u option in preference to the rc su plumbing" List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: 5ca7754519e8c618968d8acbf54d653b6e968829 Auto-Submitted: auto-generated The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=5ca7754519e8c618968d8acbf54d653b6e968829 commit 5ca7754519e8c618968d8acbf54d653b6e968829 Author: Cy Schubert AuthorDate: 2025-03-11 17:51:11 +0000 Commit: Cy Schubert CommitDate: 2025-03-11 17:51:11 +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@ MFC after: immediately This reverts commit 521f66715afb312b356afafc68cbc044a436a753. --- 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 8babda09455c..e7e42da8acc7 100755 --- a/libexec/rc/rc.d/ntpd +++ b/libexec/rc/rc.d/ntpd @@ -101,6 +101,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}" ] && @@ -114,13 +115,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