From nobody Mon Sep 30 14:22:56 2024 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 4XHNZm6HmRz5X9mt; Mon, 30 Sep 2024 14:22:56 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XHNZm4J9Hz4RKL; Mon, 30 Sep 2024 14:22:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727706176; 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=C3Hvnq6L8uHm6LLjNJbjvZTiKHsottqxGl0pCHrHBMY=; b=FVqD1l6m2Qp5R/OmCKofyn9bDV/Rk9bFQ8DOXWgDDR6z1c2uJB4YhnzqscKT0CjmT0vTjm 7nDoKziLIs1yvbUicKO4SeNZvQuKI7RiDPeLjyk+IssghORz1ftmQlYmIiInewR8koaoPv SSGVMenTCPpJewpcROzgJ5O7aAGU1+h12rmpNEA5PcrF5dThXVulivuKyybVZKvjHdLUs6 /FD+dWqZFC5LvRXzffYVKJDk3lmnYyteVNRxxcmJSul6FhdaJggoxeX2UvdbMpJoojd3F6 sxYBqT3RIYLJmevvcl+oHlref2ZybpIa5bPets0qYGS2x4PHch7NXoJ1+AgWwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727706176; 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=C3Hvnq6L8uHm6LLjNJbjvZTiKHsottqxGl0pCHrHBMY=; b=aUySjtw27aI8NmSOaLMlHEXcy+Yd60m3jGc2OdYCFhgl1+LVogPwb82qtC78MduJONGG3h oXgBizolbcO8KhEYJSCLG+kXa4dZ52jRJuMscqAZDexHVeYf+eXk1imK/5bDFPSqquF4XC iNh36mLwjRzRLsNqPVz6tkTVXLjh7np6Y4ApXRylQvEUnXfmXAYYuvXNftSasxACadhXvK ZFQSJx6uqd40OlRH5ebbSuzvHqpGa2/EiRj7viWUTFUINEO4KCCT+3qpKH9ZeZncURD0ZS 9GfpF0xBgBaTWYYBLRR8NhVYuWpSuGhEEa6FZ5ktt6clZHwvtMR7c5iyh+dCuQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727706176; a=rsa-sha256; cv=none; b=St0Bqq0CESt4qmTXqiOJ0raeP1nwmgvtqEIZHW57J9MdlM9VBaNfVticfIMy1aKn7BSm9b caO/rv3qjGSxYnf1rKza+xqm665YRI74CNoNZ7ByC2bW5Bug68kQpLgNO3KILKQ5PexT0u sv2Kz/sDB7G8hFPbhJESbYUgaQAP5A0+OmtjyWGbBL3P/bIAS+qhWPuqRudazVyGHx0mea uiwLV1cH0nXSSLHKYelu6+21e+XFWOeL9XhnT9tfz99+29aE/sXgzasVFh8hrpMMl7dxoy ZyadygyqJJaYJ2giduIpUMk9CqOsq9+kzpgHPbS4o+jGq7G8xxmYTZCmNIQXpg== 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 4XHNZm3vSXzxB3; Mon, 30 Sep 2024 14:22:56 +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 48UEMu3u005511; Mon, 30 Sep 2024 14:22:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48UEMuHU005508; Mon, 30 Sep 2024 14:22:56 GMT (envelope-from git) Date: Mon, 30 Sep 2024 14:22:56 GMT Message-Id: <202409301422.48UEMuHU005508@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 030c387f5d74 - main - tzsetup: correct timezone symlink target 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: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 030c387f5d74a66d0d5950e3450d6da24237fb2e Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=030c387f5d74a66d0d5950e3450d6da24237fb2e commit 030c387f5d74a66d0d5950e3450d6da24237fb2e Author: Ed Maste AuthorDate: 2024-09-21 11:13:27 +0000 Commit: Ed Maste CommitDate: 2024-09-30 14:22:34 +0000 tzsetup: correct timezone symlink target In chroot mode tzsetup prepended the chroot path to the symlink target, which is not correct. Use the same path for the symlink regardless of chroot mode. PR: 281332 Reported by: scf, Herbert J. Skuhra Reviewed by: olce Fixes: 5e16809c953f ("tzsetup: symlink /etc/localtime instead of co...") Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D46725 --- usr.sbin/tzsetup/tzsetup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/tzsetup/tzsetup.c b/usr.sbin/tzsetup/tzsetup.c index 617de4efb765..914eeb145a09 100644 --- a/usr.sbin/tzsetup/tzsetup.c +++ b/usr.sbin/tzsetup/tzsetup.c @@ -877,19 +877,19 @@ main(int argc, char **argv) else strlcpy(path_zonetab, dztpath, sizeof(path_zonetab)); strcpy(path_iso3166, _PATH_ISO3166); - strcpy(path_zoneinfo, _PATH_ZONEINFO); strcpy(path_localtime, _PATH_LOCALTIME); strcpy(path_db, _PATH_DB); strcpy(path_wall_cmos_clock, _PATH_WALL_CMOS_CLOCK); } else { sprintf(path_zonetab, "%s/%s", chrootenv, _PATH_ZONETAB); sprintf(path_iso3166, "%s/%s", chrootenv, _PATH_ISO3166); - sprintf(path_zoneinfo, "%s/%s", chrootenv, _PATH_ZONEINFO); sprintf(path_localtime, "%s/%s", chrootenv, _PATH_LOCALTIME); sprintf(path_db, "%s/%s", chrootenv, _PATH_DB); sprintf(path_wall_cmos_clock, "%s/%s", chrootenv, _PATH_WALL_CMOS_CLOCK); } + /* Symlink target is the same regardless of chroot */ + strcpy(path_zoneinfo, _PATH_ZONEINFO); /* Override the user-supplied umask. */ (void)umask(S_IWGRP | S_IWOTH);