Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1seot3-00CTKJ-LF for pgsql-hackers@arkaria.postgresql.org; Fri, 16 Aug 2024 04:48:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1seot2-002yuA-5Y for pgsql-hackers@arkaria.postgresql.org; Fri, 16 Aug 2024 04:48:28 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1seot0-002ytc-MD for pgsql-hackers@lists.postgresql.org; Fri, 16 Aug 2024 04:48:27 +0000 Received: from fhigh7-smtp.messagingengine.com ([103.168.172.158]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1seost-004y7h-Vm for pgsql-hackers@postgresql.org; Fri, 16 Aug 2024 04:48:25 +0000 Received: from phl-compute-06.internal (phl-compute-06.nyi.internal [10.202.2.46]) by mailfhigh.nyi.internal (Postfix) with ESMTP id 711B11151BDF; Fri, 16 Aug 2024 00:48:18 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-06.internal (MEProxy); Fri, 16 Aug 2024 00:48:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eisentraut.org; h=cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1723783698; x=1723870098; bh=fYpsQvc8kdQz8oFO3KXR/gB2gY0to7wDxwgIhv/qJVM=; b= jWKlr9CGfHhLGE67a3w4xLuR1P60VIFsvxtdQ0CKHBA7G03HOlkwRmgZoWAp+MIM 82N/Rbq0Sspnr6ZolbE5Mn4GdK6tMjQC1+JKwBY9jDR8gp0aIiScqssHHZcKDu+h 3VmtRCbDf3O/fwyCJYV6J/yoZfRu4MbyY8fe7DXNNLq4qFbib/Qfc/SaYaHiJrtb S5uXkp4TqeSBRdAWLs4I993OAzTE4IcKPhaKJNWuMykdVkVR4Ro/OVmyJn77txlG cq+l1nS0csrb1lprVLVcVg3ZEtVrN3UbnRKDecr6w+9gUxnE73IC96r7CQjkLM1z CnvzKdP+jBq6FwSaTTDEdA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1723783698; x= 1723870098; bh=fYpsQvc8kdQz8oFO3KXR/gB2gY0to7wDxwgIhv/qJVM=; b=e WsMzRn+MBMnAXo/N0cYiB5QB9JM5ZPcCZeXjUxW5oVM3Aj3+SrobLLNZKVXR6KvS Ot/GRyy6r4uFs2uk2hAGnqWRwJcbdQ35XnhSxPprMK78bVFKokpMVr7QpOA7DiAW NfiP/MZnPaBOvNeMi9vNUqxjaKef0qfZio/znTt5ltCveeuLuz4A1Vtb0GIXgf2v euk8UzE8O7tU1zoORr1vlVQZV+aLEgEy6XyTKx74QgJht9A90ANiUopi/Cv9tCZJ +PlNEN2So4Dac/RJiBEcMkCtnJdrDJ3HUnR0rx9pm5YO5WbklkrCkv9KJ7KxjTuO HRyv/xKJ/4yhXGK9nWZHA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddruddtjedgkeelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhepkfffgggfuffvfhfhjggtgfesthejredttddvjeen ucfhrhhomheprfgvthgvrhcugfhishgvnhhtrhgruhhtuceophgvthgvrhesvghishgvnh htrhgruhhtrdhorhhgqeenucggtffrrghtthgvrhhnpeehiedvhfeuhfeugefgfeehgeej tdevuefhtefhueefvddugfdtueehgfefudfhffenucevlhhushhtvghrufhiiigvpedtne curfgrrhgrmhepmhgrihhlfhhrohhmpehpvghtvghrsegvihhsvghnthhrrghuthdrohhr ghdpnhgspghrtghpthhtohepvddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtoheprg hnughrvggrshesphhrohigvghlrdhsvgdprhgtphhtthhopehpghhsqhhlqdhhrggtkhgv rhhssehpohhsthhgrhgvshhqlhdrohhrgh X-ME-Proxy: Feedback-ID: ie0a040ee:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 16 Aug 2024 00:48:17 -0400 (EDT) Message-ID: Date: Fri, 16 Aug 2024 06:48:15 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: libpq minor TOCTOU violation To: Andreas Karlsson , pgsql-hackers References: <6c9c47ed-5978-45e5-98f3-30200ead73ef@proxel.se> Content-Language: en-US From: Peter Eisentraut In-Reply-To: <6c9c47ed-5978-45e5-98f3-30200ead73ef@proxel.se> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 14.08.24 03:12, Andreas Karlsson wrote: > On 8/10/24 9:10 AM, Peter Eisentraut wrote: >> Thoughts? > > I like it. Not because of the security issue but mainly because it is > more correct to do it this way. Plus the old code running stat() on > Windows also made little sense. > > I think this simple fix can be committed. committed