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 1qQcuS-000ULH-NQ for pgsql-hackers@arkaria.postgresql.org; Tue, 01 Aug 2023 00:06:45 +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 1qQcuQ-002Skc-Jb for pgsql-hackers@arkaria.postgresql.org; Tue, 01 Aug 2023 00:06:44 +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.94.2) (envelope-from ) id 1qQcuQ-002SkT-3l for pgsql-hackers@lists.postgresql.org; Tue, 01 Aug 2023 00:06:43 +0000 Received: from mail-il1-x12e.google.com ([2607:f8b0:4864:20::12e]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qQcuO-0005Q5-Sp for pgsql-hackers@postgresql.org; Tue, 01 Aug 2023 00:06:42 +0000 Received: by mail-il1-x12e.google.com with SMTP id e9e14a558f8ab-3491568afd4so6407495ab.0 for ; Mon, 31 Jul 2023 17:06:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leadboat.com; s=google; t=1690848399; x=1691453199; 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=NDrSo9zej+kksaBxnbTtszhErAdtwZFH3sOoJ9rryCQ=; b=PGxsk5xS9X8YkIZlWt5NXANRoqYb20vzNBUb5AXO82IZ5jO7cHfkozWKBAmlViMxmF iwRHD3RItOVO3qzPem684LPCp7MmpvffiZlU49IXOsuHw460CqzUGGrRtKoM+SWpPZZk MtHm6cJpUH0Q8SO+3O0zpQDUYKjCN1jCe7xR4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690848399; x=1691453199; 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=NDrSo9zej+kksaBxnbTtszhErAdtwZFH3sOoJ9rryCQ=; b=exAp2zzSUWdwgmy8tOqYetIjqfZj1eXUQJ0IPrK4KeZltAaOW8k7+NZX++sLUR0Qt0 4XhnK9fQjn+xq/2WR2/f4tBRLuRGwnWUa3xf9NG2N1Juc68P428TFcMKh71jv2Tzj9F0 XebQb5kkz+gSXo8qefcHZ/EiyRi3eUd8WrYtmfEJWJlykxu3Yc1iaBevb1qm77v2xVNC opgYZmHiBZqrezh1kBWGQF0tCtwtigS5v01MSF5T6G0/2aZ1egV7u4g/duypixOne3/X lm3AMBU3xfWpRK/0OCFTggpA3M8b+v6ZIcwJ8h/LLOqQoE3uQV2mGxitBkTJWm/q04mf tFcg== X-Gm-Message-State: ABy/qLbIkTumCpO+c8O6lIsHN6g2jwk70Pz5/odCLYS5v0ZzAC9qbq3F 9mp8o8WDcTqQN/HIFsqdfmT0vw== X-Google-Smtp-Source: APBJJlEBaoxWOu3c6sG2J9TvbY6wR+Rl1y7+tvXPkXPUb8+FmWjkm6uDrdaR3yxnhJyyVQdWDVjQTw== X-Received: by 2002:a92:ca45:0:b0:348:f14f:433e with SMTP id q5-20020a92ca45000000b00348f14f433emr12501236ilo.12.1690848399487; Mon, 31 Jul 2023 17:06:39 -0700 (PDT) Received: from gust.leadboat.com ([99.196.131.90]) by smtp.gmail.com with ESMTPSA id y8-20020a02a388000000b0042b6940b793sm3327112jak.17.2023.07.31.17.06.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Jul 2023 17:06:38 -0700 (PDT) Date: Mon, 31 Jul 2023 20:06:28 -0400 From: Noah Misch To: Aleksander Alekseev Cc: pgsql-hackers , Alexander Lakhin Subject: Re: Getting rid of OverrideSearhPath in namespace.c Message-ID: <20230801000628.GA10592@gust.leadboat.com> References: <8ffb4650-52c4-6a81-38fc-8f99be981130@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, Jul 17, 2023 at 05:11:46PM +0300, Aleksander Alekseev wrote: > > As a follow-up for the CVE-2023-2454 fix, I think that it makes sense to > > completely remove unsafe functions > > PushOverrideSearchPath()/PopOverrideSearchPath(), which are not used in the > > core now. > > Please look at the patch attached. > > > > [...] > > > > What do you think? > > +1 to remove dead code. > > The proposed patch however removes get_collation_oid(), apparently by > mistake. Other than that the patch looks fine and passes `make > installcheck-world`. > > I added an entry to the nearest CF [1]. > > > Beside that, maybe it's worth to rename three functions in "Override" in > > their names: GetOverrideSearchPath(), CopyOverrideSearchPath(), > > OverrideSearchPathMatchesCurrent(), and then maybe struct OverrideSearchPath. > > Noah Misch proposed name GetSearchPathMatcher() for the former. > > +1 as well. I added the corresponding 0002 patch. Pushed both. Thanks.