From nobody Fri Jul 18 19:43:21 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 4bkKwL1qByz62j0V for ; Fri, 18 Jul 2025 19:43:30 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-io1-xd29.google.com (mail-io1-xd29.google.com [IPv6:2607:f8b0:4864:20::d29]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bkKwK6dhGz3RWV for ; Fri, 18 Jul 2025 19:43:29 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Authentication-Results: mx1.freebsd.org; none Received: by mail-io1-xd29.google.com with SMTP id ca18e2360f4ac-87c11fd5364so41028239f.1 for ; Fri, 18 Jul 2025 12:43:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd.org; s=google; t=1752867803; x=1753472603; darn=freebsd.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=ZQvdFUADie1A78OurJ6dWShyBmBQ9ggFJl2u5d/3KFU=; b=RoVy6WClHe06GDDGmHhuKRPv5F/8sTYBoDiAM4QI0ILg9i2M/4ASRCHRi2K+C2pNlc X00d0/aNspXvFFVd16nQMG9jb9KuqnnVOZBt4VTrGAUKzkZ90kBcYN+wQu1pyWv59bxS 4jrTHX+5EqjVSip4WA8VL7g5yhdER3dufP0/R20uo0QrJvf8srF4P7zkVnBWVUedmAGh yRbkiXVwYDnZQyL4q4Jg3J1LEOqfdA4ij1FpJL7xUQqIJOYGo930gYpTsNX4viVYQK2L 6G9iYfJwsat3IuQSzh1nWHWR9Pr3Cm2ykDl4bzdnQA2i+xZ95Z/XI+umu/5Y+3jWaVho y/3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1752867804; x=1753472604; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=ZQvdFUADie1A78OurJ6dWShyBmBQ9ggFJl2u5d/3KFU=; b=axH5mHKc/xD0V1mBydnov4Wg8NOAbzVSYpAvJQKT4UxUBWNJoWdWK+XbwNm+W4xRuG Kag7mIg9NpQmmLAtrBzKNNu6hp9TuzPU9e/ZE8GwrXyKzvp/TZ4rIA1o1a9FbTkdZ9hr 0HEGOMPP274AaFZejCYN8sHkrizsXjaGUAvhAOdPSDbjqFjhGyXI/IxWa9+RRrRgEBUy CLLsf+N1d2texNk9l7uYS+lcPbEcsMojMi+RPBPqLa+XfVYALNBp3OXwXMNfE7KfIJf8 J5fktsNay0v/79kbIqo3sHcpIWd8wy99px+uRwK/V6WFJFE1Tk0s9fFB74UyWl0twEMD T4bQ== X-Forwarded-Encrypted: i=1; AJvYcCVBD4Cm1TPtQeQGlHISAMKxCQ0Q3tp0JXN6OCkqzGx7Fyc47BM0L5ERZslwYfEiGz7xFD4SLcb9fyKs4fGlVOBSIuiP@freebsd.org X-Gm-Message-State: AOJu0Yzz4xFwPkCRHc+eS4uINnHdigG70RzuY4bXsnNLgU5h7FpLRj8b XAVkCHpkXeZIUSvsZMPvseEJmHt3HGFxMUmJj6sCiOL/D1uD7hfGwWvHoY4k/Ues2Eg= X-Gm-Gg: ASbGncvqKIHjF3qgoKveJxABV02wcDPrd7K23yE//XhMRq2/beJ5eFmxdOW2BqPIIs8 75fPEi4SHRAeQWOGZeAGavS7PUWbaqBZQmIFswhkEOQgevF+RCcXiAayT/TffKfEqVMO7RegFdE acV7rew5ryUjd3mW0Tak7Wbeg/iWwuc4tXomxpS+qThYPGJIQU8cVEwq1rsHoAfzxGG0E0do5LN Z/ujtSe+aGqm5QBnj+y9gzP0HFxQOZOw8zF1PO684GLxWbbqetVTzsoPAGIlkuk0KmTiqfn1mzE lvJxN+tazW44prw1b1fhAxHY31Ba1MtPIX0reX57FdQ4JXRFaiFd3zvBXN06y540c67Xmsz/c5a QqJVouEduWJqtQYo= X-Google-Smtp-Source: AGHT+IH0w3/4OauNlLVgyv8gdEUyCbzlzT6udq9bVwkP5vkNNfRXNjtwahrjlZ4v9chTLDYpv6Yo3Q== X-Received: by 2002:a05:6e02:97:b0:3de:287b:c445 with SMTP id e9e14a558f8ab-3e282c4f886mr115235445ab.0.1752867803446; Fri, 18 Jul 2025 12:43:23 -0700 (PDT) Received: from mutt-hbsd ([2001:470:4001:1::95]) by smtp.gmail.com with ESMTPSA id e9e14a558f8ab-3e298160723sm6033095ab.15.2025.07.18.12.43.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Jul 2025 12:43:22 -0700 (PDT) Date: Fri, 18 Jul 2025 19:43:21 +0000 From: Shawn Webb To: Dag-Erling =?utf-8?B?U23DuHJncmF2?= Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: d63ffdd1ef63 - main - tzcode: Fix time zone change detection. Message-ID: <35gxd7qvcs7nzwh3zdoh6hnb3htjnzowwitbgi6i647qtj4evj@gpwzez6ggzbd> X-Operating-System: FreeBSD mutt-hbsd 14.3-STABLE-HBSD FreeBSD 14.3-STABLE-HBSD HARDENEDBSD-14-STABLE amd64 X-PGP-Key: https://git.hardenedbsd.org/hardenedbsd/pubkeys/-/blob/master/Shawn_Webb/03A4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc References: <202507181750.56IHoLIw040938@gitrepo.freebsd.org> 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: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="xgrqnlhdjneuctbv" Content-Disposition: inline In-Reply-To: <202507181750.56IHoLIw040938@gitrepo.freebsd.org> X-Rspamd-Queue-Id: 4bkKwK6dhGz3RWV X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] --xgrqnlhdjneuctbv Content-Type: text/plain; protected-headers=v1; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Subject: Re: git: d63ffdd1ef63 - main - tzcode: Fix time zone change detection. MIME-Version: 1.0 On Fri, Jul 18, 2025 at 05:50:21PM +0000, Dag-Erling Sm=F8rgrav wrote: > The branch main has been updated by des: >=20 > URL: https://cgit.FreeBSD.org/src/commit/?id=3Dd63ffdd1ef6368407b35d41523= 7b95cc739d8073 >=20 > commit d63ffdd1ef6368407b35d415237b95cc739d8073 > Author: Dag-Erling Sm=F8rgrav > AuthorDate: 2025-07-18 17:48:59 +0000 > Commit: Dag-Erling Sm=F8rgrav > CommitDate: 2025-07-18 17:49:34 +0000 >=20 > tzcode: Fix time zone change detection. > =20 > Prior to the 2022g import, tzloadbody() returned -1 on error. Now it > returns an errno code. When I updated the time zone change detection > logic to match, I improperly returned errno in all cases, which means > that if the time zone file has not changed since we last loaded it, > tzloadbody() returns a random errno value instead of 0. > =20 > Fixes: bc42155199b5 > MFC after: 1 week > Sponsored by: Klara, Inc. > Sponsored by: NetApp, Inc. > Reviewed by: markj > Differential Revision: https://reviews.freebsd.org/D51405 > --- > contrib/tzcode/localtime.c | 14 +++++--------- > 1 file changed, 5 insertions(+), 9 deletions(-) >=20 > diff --git a/contrib/tzcode/localtime.c b/contrib/tzcode/localtime.c > index f5814a43da54..69b5f0183e2c 100644 > --- a/contrib/tzcode/localtime.c > +++ b/contrib/tzcode/localtime.c > @@ -408,10 +408,8 @@ change_in_tz(const char *name) > static char old_name[PATH_MAX]; > static struct stat old_sb; > struct stat sb; > - int error; > =20 > - error =3D stat(name, &sb); > - if (error !=3D 0) > + if (stat(name, &sb) !=3D 0) > return -1; > =20 > if (strcmp(name, old_name) !=3D 0) { > @@ -510,13 +508,11 @@ tzloadbody(char const *name, struct state *sp, bool= doextend, > * 'doextend' to ignore TZDEFRULES; the change_in_tz() > * function can only keep state for a single file. > */ > - int ret =3D change_in_tz(name); > - if (ret <=3D 0) { > - /* > - * Returns an errno value if there was an error, > - * and 0 if the timezone had not changed. > - */ > + switch (change_in_tz(name)) { > + case -1: > return errno; > + case 0: > + return 0; > } > } > fid =3D _open(name, O_RDONLY | O_BINARY); >=20 Hey DES, This commit broke buildworld: =3D=3D=3D=3D BEGIN LOG =3D=3D=3D=3D /usr/src/contrib/tzcode/localtime.c:512:11: error: no case matching constan= t switch condition '1' [-Werror] 512 | switch (change_in_tz(name)) { | ^~~~~~~~~~~~~~~~~~ /usr/src/contrib/tzcode/localtime.c:433:25: note: expanded from macro 'chan= ge_in_tz' 433 | #define change_in_tz(X) 1 =3D=3D=3D=3D END LOG =3D=3D=3D=3D Thanks, --=20 Shawn Webb Cofounder / Security Engineer HardenedBSD Signal Username: shawn_webb.74 Tor-ified Signal: +1 303-901-1600 / shawn_webb_opsec.50 https://git.hardenedbsd.org/hardenedbsd/pubkeys/-/raw/master/Shawn_Webb/03A= 4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc --xgrqnlhdjneuctbv Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEA6TL67gupaZ9nzhT/y5nonf44foFAmh6o9IACgkQ/y5nonf4 4fpFHg/+JCgMWIOJXY/VozvqPHl5FaGiVWeP3fN8QAyEYRnqmceEAnBqt2Rgwmso 72BS30P/YIlpQLlyx7zaXowPXLs1D+E2wCAZOZ4Q950Gcsvr6EX2YHJOupNKRJxM xGjQqLO45fZ2NNYd5Y9AzJv3XAcgvxUt7CUlBcosrA/CebFHZC4WRo1V4IBkZPq/ 8h2vzy2H5QckARXsVAVMgY78/xspDsNSGptQp7c1bnA14o2Z6BEo07T41JDNQCn2 GTC0fA8cbndIPm+WrvRfl66t05zvzludLNkSd+9RMUup6teKVOjIJXo1uKbQ3mBa 8o1JMC8JNmvYQB94NgiX/yrn9DkYorlgzwFyh3s39jKFXYDYNQkTdalp0sXzSlSa 1/8Ttt9lfgDCQOOgBI+OBNqfEhkciYAR8/WQQ/Ix0iE/4O7mDSBE9rx1UtL+ntP5 /9gqPVFarUaMnKi5rb0NWBkDLPriEJzYMpzg4EQpYd27NhxdwnndK+6pNFi3J8us VAOGDYGxcwKYulP1UGKf5TACVg0YSQiEUlY4rTHAk4QJc2Pee2XioKgqXNzDIb9Q xBesJrIoRY/5ySHRXXQKvhYx1mwa0TU9qOspwEfJe+U9zPrsyH7OqsnbhEsJmsF/ DIKkNgusaIHR7T5nCal+4KIcfqom/fbw1U9mv6PKUBN9bvTNLFY= =/6yA -----END PGP SIGNATURE----- --xgrqnlhdjneuctbv--