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.96) (envelope-from ) id 1wRocd-002iwf-2k for pgsql-hackers@arkaria.postgresql.org; Tue, 26 May 2026 10:02:51 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wRocb-004Jlm-2V for pgsql-hackers@arkaria.postgresql.org; Tue, 26 May 2026 10:02:50 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wRocb-004Jld-1b for pgsql-hackers@lists.postgresql.org; Tue, 26 May 2026 10:02:50 +0000 Received: from udcm-wwu2.uni-muenster.de ([128.176.118.28]) by magus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wRoca-00000001V1O-24ur for pgsql-hackers@postgresql.org; Tue, 26 May 2026 10:02:50 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=uni-muenster.de; i=@uni-muenster.de; q=dns/txt; s=uniout; t=1779789769; x=1811325769; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=4Wcr/Sj7nU4atwb9rQYK4ThqO5+UmZeWZ49SfzpO8dc=; b=tUAJ06bg4t2s5eG74UxqQOZmL0fcSwJasmJNWCLEeXP5ZEj0UhOCcfL5 maSr1XdsXJCYXgV32TF8BfzAOgkdBfrwPpDk1Rmghxt4N/HynOYOUpaZp BsP9VSuCPfO6dGEAc4yPlXNDPj40N6QwSwMwtaEMGIQCOY0+jPog8WKjb 1wFCIeLtCQdFJYVeyFrL6N22MhNIyOa4cCgvmck0liLJD2daCvK9HMSQP JGnu+xM7OPSwxR9V8ECs0GeGK7jBiHK8P5ajFsxvqFLclxURQX2Gl1jVQ 8rFQwuUOHSwSpyCSDrjgzAvz+SoYSLAA6dJLWOTZb2j34wIJjySCVYsgW Q==; X-CSE-ConnectionGUID: iwEw/YW9RFK0fBOlxrx+kQ== X-CSE-MsgGUID: kQr7PuKPTIypLM3bIKYogQ== X-IronPort-AV: E=Sophos;i="6.24,169,1774306800"; d="scan'208";a="395259926" Received: from secmail.uni-muenster.de ([128.176.118.4]) by UDCM-RELAY2.UNI-MUENSTER.DE with ESMTP; 26 May 2026 12:02:48 +0200 Received: from [192.168.178.49] (dynamic-078-048-249-138.78.48.pool.telefonica.de [78.48.249.138]) by SECMAIL.UNI-MUENSTER.DE (Postfix) with ESMTPSA id C974820ADF02; Tue, 26 May 2026 12:02:46 +0200 (CEST) Message-ID: <8460e17f-7fa1-4df1-b007-e1b234f18064@uni-muenster.de> Date: Tue, 26 May 2026 12:02:45 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Avoid leaking system path from pg_available_extensions To: Chao Li , Matheus Alcantara Cc: PostgreSQL-development , Andrew Dunstan References: <357C774A-ECE9-4455-B641-315205D4D9A1@gmail.com> <96203151-6929-4d88-85a0-d552ee258a24@gmail.com> <87c8f8ac-614b-4679-afc7-f591b76c8ff7@gmail.com> <83AF10FE-7655-43DF-A302-3CAC796B572F@gmail.com> Content-Language: en-US, de-DE From: Jim Jones In-Reply-To: <83AF10FE-7655-43DF-A302-3CAC796B572F@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 26/05/2026 09:14, Chao Li wrote: > In theory, I’m not against the idea either. In practice, there are many hard-coded strings in the source tree, and I’m not sure where the right place would be to define this macro. > > Since this string is only used in get_extension_control_directories(), and now it is used three times, I defined it at the beginning of the function and undefined it at the end. Let’s see if there are any objections to that. I don't feel strongly about it. I only brought it up because hardcoded strings used in multiple places are usually a recipe for oversights and painful debugging down the road. That said, as I mentioned, I understand the argument that this is scoped to a single function, and the fact they're pretty close to one another also makes it less likely to be missed, but there is no guarantee it'll stay like that forever. Thanks for the fix! Best, Jim