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 1pIStG-0008Am-SC for pgsql-hackers@arkaria.postgresql.org; Thu, 19 Jan 2023 11:15:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pIStF-0006A2-Oj for pgsql-hackers@arkaria.postgresql.org; Thu, 19 Jan 2023 11:15:29 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pIStF-00069s-Ey for pgsql-hackers@lists.postgresql.org; Thu, 19 Jan 2023 11:15:29 +0000 Received: from mail-pj1-x102b.google.com ([2607:f8b0:4864:20::102b]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pIStD-0000Xq-OQ for pgsql-hackers@postgresql.org; Thu, 19 Jan 2023 11:15:29 +0000 Received: by mail-pj1-x102b.google.com with SMTP id y3-20020a17090a390300b00229add7bb36so1492266pjb.4 for ; Thu, 19 Jan 2023 03:15:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb.com; s=google; h=content-language:content-transfer-encoding:in-reply-to:mime-version :user-agent:date:message-id:references:cc:to:from:subject:from:to:cc :subject:date:message-id:reply-to; bh=foohRFCwGwFLrh0O3EYSW6qw3OhHQk26ztkpuT5n2Jo=; b=OprWrqdwvEOZMmV0QOVrK/h5fV/BeTqfgBRxzYAceX2yw83G2WAbEZlEsbuFwbDYTX SNKf3dAw957VoZcBxd7/ZyfuG2IoB7UVFSaA4iOMgn5xh8ydrTM+3cK46e7NQJLs3L8d 8vTGzHDsk+Ukb8TwqrORSTJ70E9TRwNdI3qO06h1uXAoQbZuclWdsT0g8xcvzm64rBo4 Dfrvtf4al3yzFJmBOWMeoujQHnmhpETln7BISUgYfwBtpJh3Py1BMOYAMDN0w44WFQJf p/FfhmSuvbDyFUvUXOuYmp30LfZyBV0H+GbqsOOTPg9LGUzsw2m/eCAevtBsuzbtbKh6 4nRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-language:content-transfer-encoding:in-reply-to:mime-version :user-agent:date:message-id:references:cc:to:from:subject :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=foohRFCwGwFLrh0O3EYSW6qw3OhHQk26ztkpuT5n2Jo=; b=PyFnKKLceUNA+h/9nUNxiAYfkTUuVaSziYAxu9xOQp9B+pmw9fl3IIm5F5d9NSerDP Jv6y4DQ0Pvaum4Gn320JDc9+hzPhZznmK+qf4DH0bosG7GSZyhKRGzRkdrbU65mFZ6J3 rdUHqyHWPjZDKsTYBctF48WgBgrdwZFRFmf9E0TLm4ev5WtT2UOw/g0/Pzfg9VfYu9jZ +GJQp8r5/+rK9A31/ze68gCiMFnx/zue7gniXnnN5yuGy5+ygZFiQO/STqfiNxuFt+mN yHrgXgKSsP+sfpF1N7oYptadR11XyyBYzqJmDCql5oXDusXKCifSso4g1PWIzZ2WfyyS YZ3g== X-Gm-Message-State: AFqh2kr9PWY9Auk6RQOaByI7xc4lZL4rSP6vlCT8x3j54UYlyFK22FCN IBXw0BrE3eDAklR6d39AN78GMfS5NYRxFKUWun53rqueoBFlUs6dvyCdlx1fK10DbMo0gYuEi8w UmWOstDjfcmQ61Y93KATgCZV/PUIX0NJKbEP4VDmTJx37uXHEIVcVb/F2VMMl9ljD71pL5OYJB4 PkSY0WcLIz/9rFye+Q/g9DlMp2u2+nskraxxOW1pdlmaTdHNqVQoOKyXwi4zIIlc2HQH9ymfW10 lmQAAfSKDIw0wvHmy1meWact5n+rRs8Dr8P3VibsYLqRRq9sH3faKGqHHhHfM6bkotecGp9kdTM cJRPZpDCOcXRgcyT2Y8NOxvvB9BV7v3fNqx3 X-Google-Smtp-Source: AMrXdXuGm8l8xR05/ljIqbXbyLg/TXUKv6zeWrGa362U5T9sNkGY8TTQVqVjum64lisCI+YStFLi7A== X-Received: by 2002:a17:902:b784:b0:194:9e8d:e9c7 with SMTP id e4-20020a170902b78400b001949e8de9c7mr10783486pls.41.1674126925289; Thu, 19 Jan 2023 03:15:25 -0800 (PST) Received: from localhost.localdomain ([114.143.109.178]) by smtp.gmail.com with ESMTPSA id h13-20020a170902680d00b001947ba0ac8fsm10263327plk.236.2023.01.19.03.15.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 19 Jan 2023 03:15:24 -0800 (PST) Subject: Re: CREATEROLE users vs. role properties From: tushar To: Nathan Bossart , Robert Haas Cc: "pgsql-hackers@postgresql.org" References: <20230118231749.GA3790025@nathanxps13> <482146ee-e73e-5378-6595-b06e044acc43@enterprisedb.com> Message-ID: <0d55df3d-da0e-7960-8bc7-a43355a81c6f@enterprisedb.com> Date: Thu, 19 Jan 2023 16:45:22 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: <482146ee-e73e-5378-6595-b06e044acc43@enterprisedb.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-CLOUD-SEC-AV-Info: enterprisedb,google_mail,monitor X-CLOUD-SEC-AV-Sent: true X-Gm-Spam: 0 X-Gm-Phishy: 0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 1/19/23 3:05 PM, tushar wrote: > which was working previously without patch. My bad, I was testing against PG v15 but this issue is not reproducible on master (without patch). As you mentioned- "This implements the standard idea that you can't give permissions you don't have (but you can give the ones you do have)" but here the role is having createrole  privilege that he cannot pass on to another user? Is this expected? postgres=# create role fff with createrole; CREATE ROLE postgres=# create role xxx; CREATE ROLE postgres=# set role fff; SET postgres=> alter role xxx with createrole; ERROR:  permission denied postgres=> -- regards,tushar EnterpriseDB https://www.enterprisedb.com/ The Enterprise PostgreSQL Company