pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: 断桥烟雨三两月 <1310659646@qq.com>
Cc: pgsql-bugs <pgsql-bugs@lists.postgresql.org>
Subject: Re: report bug
Date: Thu, 30 Apr 2020 09:47:02 -0400
Message-ID: <20119.1588254422@sss.pgh.pa.us> (raw)
In-Reply-To: <CAKFQuwbeAyA3N6OvQ4rzbka6NLpmAHbaGdzEXEr8v+KkRmeWYw@mail.gmail.com>
References: <tencent_957562A3285F2599F27FFBE2F86E9885CF08@qq.com>
	<CAKFQuwbeAyA3N6OvQ4rzbka6NLpmAHbaGdzEXEr8v+KkRmeWYw@mail.gmail.com>

"David G. Johnston" <david.g.johnston@gmail.com> writes:
>> So, why a role with NOCREATEDB can create a role who can create DB?

> Cannot answer why but given it is documented as working this way this isn’t
> a bug.

Yeah, that's deliberate.  CREATEROLE is intended to be sufficient
privilege for all day-to-day user/role administration, so that you
don't have to use a superuser bit for that.  The only restriction
on it is you can't manufacture new superuser roles ... but you
definitely can manufacture roles that have other privileges you
don't have yourself.  In particular, a CREATEROLE role can issue
GRANTs for privileges it doesn't have itself; so the behavior with
respect to CREATEDB isn't different from that.

			regards, tom lane





view thread (5+ messages)

Message-ID: <20119.1588254422@sss.pgh.pa.us>
Permalink:  ../20119.1588254422@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/20119.1588254422@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, david.g.johnston@gmail.com, 1310659646@qq.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: report bug
  In-Reply-To: <20119.1588254422@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox