pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Alvaro Herrera <alvherre@commandprompt.com>
Cc: Euler Taveira de Oliveira <euler@timbira.com>
Cc: Owen Jacobson <owen.jacobson@grimoire.ca>
Cc: pgsql-bugs <pgsql-bugs@postgresql.org>
Subject: Re: CREATEROLE does not permit commenting on newly-created roles
Date: Wed, 09 Mar 2011 00:45:48 -0500
Message-ID: <10429.1299649548@sss.pgh.pa.us> (raw)
In-Reply-To: <AANLkTin_zU0f1wZqNTM9N6e8OAcpD6eX70Y6JiB-y15k@mail.gmail.com>
References: <AANLkTikUMg1VZZ8QoE+kniY8p31k7bmJZ=JB+ABeXLY6@mail.gmail.com>
	<4D75B945.7040304@timbira.com>
	<1299599930-sup-5129@alvh.no-ip.org>
	<11529.1299600744@sss.pgh.pa.us>
	<9098.1299646108@sss.pgh.pa.us>
	<AANLkTin_zU0f1wZqNTM9N6e8OAcpD6eX70Y6JiB-y15k@mail.gmail.com>

Robert Haas <robertmhaas@gmail.com> writes:
> On Tue, Mar 8, 2011 at 11:48 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> In particular, I suggest the attached patch (code-complete, but sans
>> documentation changes).

> I think it's a good change, but we should make sure to release-note it
> properly,

I had already drafted a commit message:

    Adjust the permissions required for COMMENT ON ROLE.
    
    Formerly, any member of a role could change the role's comment, as of
    course could superusers; but holders of CREATEROLE privilege could not,
    unless they were also members.  This led to the odd situation that a
    CREATEROLE holder could create a role but then could not comment on it.
    It also seems a bit dubious to let an unprivileged user change his own
    comment, let alone those of group roles he belongs to.  So, change the
    rule to be "you must be superuser to comment on a superuser role, or
    hold CREATEROLE to comment on non-superuser roles".  This is the same
    as the privilege check for creating/dropping roles, and thus fits much
    better with the rule for other object types, namely that only the owner
    of an object can comment on it.
    
    Per complaint from Owen Jacobson and subsequent discussion.

How that gets boiled down into a release note will depend on whoever
writes the release notes.

> along with the change you made for PLs.

Hrm?

			regards, tom lane



view thread (10+ messages)  latest in thread

Message-ID: <10429.1299649548@sss.pgh.pa.us>
Permalink:  ../10429.1299649548@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/10429.1299649548@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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, robertmhaas@gmail.com, alvherre@commandprompt.com, euler@timbira.com, owen.jacobson@grimoire.ca
  Subject: Re: CREATEROLE does not permit commenting on newly-created roles
  In-Reply-To: <10429.1299649548@sss.pgh.pa.us>
  References: <AANLkTikUMg1VZZ8QoE+kniY8p31k7bmJZ=JB+ABeXLY6@mail.gmail.com> <4D75B945.7040304@timbira.com> <1299599930-sup-5129@alvh.no-ip.org> <11529.1299600744@sss.pgh.pa.us> <9098.1299646108@sss.pgh.pa.us> <AANLkTin_zU0f1wZqNTM9N6e8OAcpD6eX70Y6JiB-y15k@mail.gmail.com> <10429.1299649548@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