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 1ka0s4-00014M-1Q for pgsql-bugs@arkaria.postgresql.org; Tue, 03 Nov 2020 18:17:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ka0s2-0000fM-Qr for pgsql-bugs@arkaria.postgresql.org; Tue, 03 Nov 2020 18:17:26 +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 1ka0s2-0000fF-Kp for pgsql-bugs@lists.postgresql.org; Tue, 03 Nov 2020 18:17:26 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ka0s0-0005v3-LR for pgsql-bugs@lists.postgresql.org; Tue, 03 Nov 2020 18:17:25 +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 0A3IHN1L958391; Tue, 3 Nov 2020 13:17:23 -0500 From: Tom Lane To: Stephen Frost cc: Wolfgang Walther , pgsql-bugs@lists.postgresql.org Subject: Re: User with BYPASSRLS privilege can't change password In-reply-to: <20201103180641.GX16415@tamriel.snowman.net> References: <923005.1604420579@sss.pgh.pa.us> <956994.1604425451@sss.pgh.pa.us> <20201103180641.GX16415@tamriel.snowman.net> Comments: In-reply-to Stephen Frost message dated "Tue, 03 Nov 2020 13:06:42 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <958389.1604427443.1@sss.pgh.pa.us> Date: Tue, 03 Nov 2020 13:17:23 -0500 Message-ID: <958390.1604427443@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Stephen Frost writes: >> @@ -739,7 +741,6 @@ AlterRole(AlterRoleStmt *stmt) >> createrole < 0 && >> createdb < 0 && >> canlogin < 0 && >> - isreplication < 0 && >> !dconnlimit && >> !rolemembers && >> !validUntil && > This seems like an independent change..? Not saying it's wrong though. That test is redundant, since we wouldn't be in this path at all if isreplication >= 0. You could alternatively argue that this should redundantly test all three of issuper, isreplication, and bypassrls; but testing just one of them is confusing and hence bug-prone. regards, tom lane