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 1ka10i-0001LB-RT for pgsql-bugs@arkaria.postgresql.org; Tue, 03 Nov 2020 18:26:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ka10h-0003vD-Mo for pgsql-bugs@arkaria.postgresql.org; Tue, 03 Nov 2020 18:26:23 +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 1ka10h-0003v6-GV for pgsql-bugs@lists.postgresql.org; Tue, 03 Nov 2020 18:26:23 +0000 Received: from dd27502.kasserver.com ([85.13.146.49]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ka10b-0001Dt-FN for pgsql-bugs@lists.postgresql.org; Tue, 03 Nov 2020 18:26:23 +0000 Received: from [192.168.0.52] (ip-37-201-154-176.hsi13.unitymediagroup.de [37.201.154.176]) by dd27502.kasserver.com (Postfix) with ESMTPSA id DF3A660CA5BD; Tue, 3 Nov 2020 19:26:14 +0100 (CET) Subject: Re: User with BYPASSRLS privilege can't change password To: Tom Lane Cc: Stephen Frost , pgsql-bugs@lists.postgresql.org References: <923005.1604420579@sss.pgh.pa.us> <956994.1604425451@sss.pgh.pa.us> <3e771893-1ed1-97e7-6c4a-7b0d00992103@technowledgy.de> <958492.1604427541@sss.pgh.pa.us> From: Wolfgang Walther Message-ID: Date: Tue, 3 Nov 2020 19:26:13 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.12.1 MIME-Version: 1.0 In-Reply-To: <958492.1604427541@sss.pgh.pa.us> 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: Precedence: bulk Tom Lane: > How do you figure that? This is in an "else" path after > > else if (authform->rolreplication || isreplication >= 0) > > so AFAICS it's impossible to get there. If it isn't impossible, > we have a much bigger hole with respect to issuper. Yes, you're right. I read the || as &&. And also missed the ! in else if (!have_createrole_privilege()) btw. :) I guess the error message "must be superuser to alter replication users" led me on the wrong path. I would be more precise as "must be superuser to alter replication users or change replication attribute" to cover the change-non-replication-to-replication user case, I think. The same thing for superusers. Best Wolfgang