Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nahcv-0003AZ-NL for pgsql-hackers@arkaria.postgresql.org; Sat, 02 Apr 2022 17:33:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nahbw-0002cN-C9 for pgsql-hackers@arkaria.postgresql.org; Sat, 02 Apr 2022 17:32:28 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nahbv-0002cD-Pa for pgsql-hackers@lists.postgresql.org; Sat, 02 Apr 2022 17:32:28 +0000 Received: from mail-ua1-x92f.google.com ([2607:f8b0:4864:20::92f]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nahbt-0000dK-FN for pgsql-hackers@postgresql.org; Sat, 02 Apr 2022 17:32:26 +0000 Received: by mail-ua1-x92f.google.com with SMTP id r19so1437528uat.9 for ; Sat, 02 Apr 2022 10:32:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=joeconway.com; s=google; h=message-id:date:mime-version:user-agent:content-language:to:cc :references:from:subject:in-reply-to:content-transfer-encoding; bh=1p+5efPwGB4CKDUe3G/LEPhOEvPWchUhDkKDZBCBUhw=; b=mb40POylAyfzFc8aI5rRSQR/qfHgeiq8+QI9wLiGWNo3GzgI8PUJV6fHNuqHllZFlQ 8bigX78sSmtr6jqyYNHhdxMJakJlQBcXnI7r/eGjLLlhQ9rFOXz/TZzdCTgk7AgiFHbX VuutTQBpt+iZXUit3T185BZ+OQDHhjogMXML8C64dxAeSOxyL0Q5tEzJg4RrL8ahgpPR 1IzmoyKId/bK0UOU3A4GAjbO6FLManbblAvuZ5z7UurK5kMcVpe6ynOuVriQ2xMQCETz qfFJT7/zHaCQZJtU/BmkMhZUXnXEafoU+MhL0ZrJWaydvgtUH6kx6uIZeoJIog1Iud1C z1+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent :content-language:to:cc:references:from:subject:in-reply-to :content-transfer-encoding; bh=1p+5efPwGB4CKDUe3G/LEPhOEvPWchUhDkKDZBCBUhw=; b=GwjajRr7mNoXjZjAX7dvvqWEZpRtffnIrgwkZy2WpVT7w/fSQk9jJSAScyb8EOsgLk 2vQ1uahSaqZDupglyo88kmSCP/CdyNhMYLaUxfFdqeEACmNGCYeMAxOxCOd9+myo/8IL zF6qJtfgWR/O3s4jhMXGcDCCVKDX6VNASbJR0VWp4vqbMcxKIouOVqtB3pgmJFoMLCWF 9KHOViVShu2dqY9VPCJ2bBDgksRgqyuNJqwsiGcWpNQWCrW/sNpiz7PTsg39BlCW5lSm mCwUw6e59ZboZqmtrMVSajy0TYO6pxwH3+aFuI7vv/zAs2ytE3yMroW1bgtR11MmOz8V GgZg== X-Gm-Message-State: AOAM531fzGjb/zeG7c0i8ajpHv1ETf8tLOtKHEYjOKwtdczV5z75G8i7 4ehB330yuttLnzGeYQb34U5TdQ== X-Google-Smtp-Source: ABdhPJxG5Eo1Nu/DdMPiI86sXdo3b5vIuU+twGlUESHT840CJxm4EwDObt+kipZO7EgCadzBjt8zlg== X-Received: by 2002:ab0:49e1:0:b0:35c:bebe:5611 with SMTP id f30-20020ab049e1000000b0035cbebe5611mr553420uad.118.1648920743825; Sat, 02 Apr 2022 10:32:23 -0700 (PDT) Received: from [192.168.4.41] (072-017-018-098.res.spectrum.com. [72.17.18.98]) by smtp.gmail.com with ESMTPSA id a3-20020a67d303000000b00325ac2f28bcsm631344vsj.10.2022.04.02.10.32.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 02 Apr 2022 10:32:23 -0700 (PDT) Message-ID: <8370d856-28cd-6884-c155-0cbdcc0b4d79@joeconway.com> Date: Sat, 2 Apr 2022 13:32:22 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Content-Language: en-US To: Robert Haas Cc: Stephen Frost , Joshua Brindle , "Bossart, Nathan" , Nathan Bossart , PostgreSQL-development , Tom Lane References: <80af9ba7-ec24-9134-8fd9-00bf13f5c494@joeconway.com> <0b1b6cfb-d752-28f6-7ccb-993998be0189@joeconway.com> <20220209181333.GD1627503@nathanxps13> <20220210192829.GB1684442@nathanxps13> <6135d0b7-3af9-d6fa-cdaa-990a2fc12147@joeconway.com> <744cf762-47d3-050f-5fa1-d4f9e8dbae2e@joeconway.com> <6732fdfd-0ea4-941d-fd85-331ff48af5ce@joeconway.com> From: Joe Conway Subject: Re: [PATCH v2] use has_privs_for_role for predefined roles In-Reply-To: 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 3/28/22 15:56, Robert Haas wrote: > On Mon, Mar 21, 2022 at 4:15 PM Joe Conway wrote: >> Robert -- any opinion on this? If I am not mistaken it is code that you >> are actively working on. > > Woops, I only just saw this. I don't mind if you want to change the > calls to is_member_of_role() in basebackup_server.c and > basebackup_to_shell.c to has_privs_of_role(). Done as originally posted. > On that last note, I did not find basebackup_to_shell.required_role > documented at all, and did not attempt to fix that. I saw that Robert added documentation and it already reads correctly I believe, except possibly an unrelated issue: 8<-------------- A role which replication whose privileges users are required to possess in order to make use of the shell backup target. If this is not set, any replication user may make use of the shell backup target. 8<-------------- Robert, should that actually be: s/role which replication/role with replication/ ? Joe