From nobody Tue Mar 11 17:59:24 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 4ZC1jm6qhXz5qsND; Tue, 11 Mar 2025 17:59:24 +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 4ZC1jm61Lhz3vhs; Tue, 11 Mar 2025 17:59:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1741715964; 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=KptxMCpFMjlV51hINk9VMY5+E0MVom7Z3cNtIwWk3ls=; b=DEWzrb/+MYDkayGQxexfXPkmiNToilwFcREhAXyKYXAp/W4NyaOpI8qx6PhyAhtGKo7jlj /2NaS+7Nd35ra5bWjgrMgpt21eD3wnL5JrXte03S3up9lilBm90YNh1XrlxjMbXoV6bLDs 5anLQ7P4dJUqYScAHPMDTKl0Vww3va1ZncjOTacREDbIPZHZ0WHyvivJG99slFnEb0LwZ2 cXvg/N0SNqka+6JZejBjvVpo/LWkxVElCA3o4nzx55IJ5iANpPJMRQ7nz/1JciTVAQfB1y ODXUOlpFSwPoaP+gIg2uKriadT3Lh+/hmcZg5w6DbXj99isNYEZKtOMiNBInWA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1741715964; a=rsa-sha256; cv=none; b=ee3m0a3g+XEfMxVSc5NlsIzGLjya3dlT4BBWegDUKQiOByVfVJhkzsRkHJCjURRfI98Jkq 15e3Z494eOt8TKOU3M3anhM8R0bEmF+tw1wdsbx2OEveQtU8wWQiiGRbtl5KTbnNEKGVph 5Tkt+fzeImXjWBQMyoVeXh+jLP8JLcklk8Da1EN5rUuKFNBAj6xiAn2E8VaHDkEcAKBgZ5 CGO2+oGz4Pu3ck+v3zmpyEKv6POu3sx4eNkxzG6RUfN2vjPOskcOMu80EAXZ1ray2CeIJI cqYl7n23sn8wJsq3WLaT5s1ohBIQpj0Q26Pu6kN3Ria+aOTrCKpabGr5MvdUcw== 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=1741715964; 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=KptxMCpFMjlV51hINk9VMY5+E0MVom7Z3cNtIwWk3ls=; b=wVK9zMLU/5dTrsd3I4wh/BquSR3n8Z2fMgDD8xDuQM23wqHWimK4bgl//O0YHvRqzhxAxB Tg0kLLwUSHuqSWUIRtiEovK+XaXUuSfGxGAvb6wU4fbTTUQP5rhEPv6UQYoD37YY2ZgGZs Gvpdh9YVzm/pM/JZvZKs9nX+P9AOU+wJbQB0JCwW7H0BuwVmicKvFhDmWsF2RsGeuBDGPK xBh/maRrSe7QceYu5nPlneCjhAVF0w4hxpqYMPoX6EJfKCUCIw+OT0cP6Z0rslVsCOAQCl sBCtjBLg5AeBDCXyivkR7TkUoPgbu5Tjhj1nJRIOpQMsRkXFrzD2avxpJhVlAg== 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 4ZC1jm52Nbzchl; Tue, 11 Mar 2025 17:59:24 +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 52BHxOOV061217; Tue, 11 Mar 2025 17:59:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52BHxOwf061214; Tue, 11 Mar 2025 17:59:24 GMT (envelope-from git) Date: Tue, 11 Mar 2025 17:59:24 GMT Message-Id: <202503111759.52BHxOwf061214@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: 94f414086075 - stable/14 - 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/14 X-Git-Reftype: branch X-Git-Commit: 94f41408607515afc2857a283a499d979240c71d Auto-Submitted: auto-generated The branch stable/14 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=94f41408607515afc2857a283a499d979240c71d commit 94f41408607515afc2857a283a499d979240c71d Author: Cy Schubert AuthorDate: 2025-03-11 17:51:11 +0000 Commit: Cy Schubert CommitDate: 2025-03-11 17:59:10 +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