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 1ka0te-00017X-Aj for pgsql-bugs@arkaria.postgresql.org; Tue, 03 Nov 2020 18:19:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ka0td-0001u4-8h for pgsql-bugs@arkaria.postgresql.org; Tue, 03 Nov 2020 18:19:05 +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 1ka0td-0001tw-2m for pgsql-bugs@lists.postgresql.org; Tue, 03 Nov 2020 18:19:05 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ka0tb-0001AL-0j for pgsql-bugs@lists.postgresql.org; Tue, 03 Nov 2020 18:19:04 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 0A3IJ1Mk958493; Tue, 3 Nov 2020 13:19:01 -0500 From: Tom Lane To: Wolfgang Walther cc: Stephen Frost , pgsql-bugs@lists.postgresql.org Subject: Re: User with BYPASSRLS privilege can't change password In-reply-to: <3e771893-1ed1-97e7-6c4a-7b0d00992103@technowledgy.de> References: <923005.1604420579@sss.pgh.pa.us> <956994.1604425451@sss.pgh.pa.us> <3e771893-1ed1-97e7-6c4a-7b0d00992103@technowledgy.de> Comments: In-reply-to Wolfgang Walther message dated "Tue, 03 Nov 2020 19:05:32 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <958491.1604427541.1@sss.pgh.pa.us> Date: Tue, 03 Nov 2020 13:19:01 -0500 Message-ID: <958492.1604427541@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Wolfgang Walther writes: > This is because the "must be superuser to alter replication users" > condition only triggers when the altered role already has isrepliaction, > so isreplication could very well be >= 0 here. 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. regards, tom lane