mirror of
https://github.com/postgres/postgres.git
synced 2025-06-20 15:22:23 +03:00
From: Jan Wieck <jwieck@debis.com>
seems that my last post didn't make it through. That's good since the diff itself didn't covered the renaming of pg_user.h to pg_shadow.h and it's new content. Here it's again. The complete regression test passwd with only some float diffs. createuser and destroyuser work. pg_shadow cannot be read by ordinary user.
This commit is contained in:
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/misc/superuser.c,v 1.4 1997/09/08 02:32:00 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/misc/superuser.c,v 1.5 1998/02/25 13:08:23 scrappy Exp $
|
||||
*
|
||||
* DESCRIPTION
|
||||
* See superuser().
|
||||
@ -17,7 +17,7 @@
|
||||
|
||||
#include <postgres.h>
|
||||
#include <utils/syscache.h>
|
||||
#include <catalog/pg_user.h>
|
||||
#include <catalog/pg_shadow.h>
|
||||
|
||||
bool
|
||||
superuser(void)
|
||||
@ -33,5 +33,5 @@ superuser(void)
|
||||
utup = SearchSysCacheTuple(USENAME, PointerGetDatum(UserName),
|
||||
0, 0, 0);
|
||||
Assert(utup != NULL);
|
||||
return ((Form_pg_user) GETSTRUCT(utup))->usesuper;
|
||||
return ((Form_pg_shadow) GETSTRUCT(utup))->usesuper;
|
||||
}
|
||||
|
Reference in New Issue
Block a user