Re: [HACKERS] Postgres acl

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: kwitten(at)qdt(dot)com
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Postgres acl
Date: 1998-01-06 05:19:32
Message-ID: 199801060519.AAA12124@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>
> I believe I found a bug. If a user other than the postgres superuser is
> given permission to create databases, then he should be able to destroy
> the databases he creates. Currently he can't, at least in version 6.2.1
> complied for SunOS 5.5. Only the poostgres superuser can delete
> databases. If otherusers try they get the following error message:
>
> "WARN:pg_database: Permission denied.
> destroydb: database destroy failed on tmpdb."
>
> eventhough this user is the database admin for tmpdb as shown in the
> pd_database table.
>
>

Here is the fix. This bug has been around for a while:

---------------------------------------------------------------------------

*** ./aclchk.c.orig Tue Jan 6 00:10:25 1998
--- ./aclchk.c Tue Jan 6 00:18:40 1998
***************
*** 410,416 ****
* pg_database table, there is still additional permissions
* checking in dbcommands.c
*/
! if (mode & ACL_AP)
return ACLCHECK_OK;
}

--- 410,416 ----
* pg_database table, there is still additional permissions
* checking in dbcommands.c
*/
! if ((mode & ACL_WR) || (mode & ACL_AP))
return ACLCHECK_OK;
}

--
Bruce Momjian
maillist(at)candle(dot)pha(dot)pa(dot)us

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message The Hermit Hacker 1998-01-06 05:45:58 Re: [HACKERS] I want to change libpq and libpgtcl for better handling of large query results
Previous Message Bruce Momjian 1998-01-06 05:06:39 Re: [HACKERS] subselect