diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2000-09-06 14:15:31 +0000 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2000-09-06 14:15:31 +0000 |
commit | 6dc249610a87aa8b9dcc8baf4e64d2e14d02f548 (patch) | |
tree | 6ca1b864625ecf91a2887c8031a9fa91b5f9c5c5 /src/include/utils | |
parent | daf1e3a7026e367d630be3ac34ac0a9e7cf1340f (diff) | |
download | postgresql-6dc249610a87aa8b9dcc8baf4e64d2e14d02f548.tar.gz postgresql-6dc249610a87aa8b9dcc8baf4e64d2e14d02f548.zip |
Code cleanup of user name and user id handling in the backend. The current
user is now defined in terms of the user id, the user name is only computed
upon request (for display purposes). This is kind of the opposite of the
previous state, which would maintain the user name and compute the user id
for permission checks.
Besides perhaps saving a few cycles (integer vs string), this now creates a
single point of attack for changing the user id during a connection, for
purposes of "setuid" functions, etc.
Diffstat (limited to 'src/include/utils')
-rw-r--r-- | src/include/utils/acl.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/include/utils/acl.h b/src/include/utils/acl.h index e8a8f3a111b..5e91f56bf50 100644 --- a/src/include/utils/acl.h +++ b/src/include/utils/acl.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: acl.h,v 1.26 2000/07/31 22:39:02 tgl Exp $ + * $Id: acl.h,v 1.27 2000/09/06 14:15:31 petere Exp $ * * NOTES * For backward-compatibility purposes we have to allow there @@ -197,11 +197,11 @@ extern void ChangeAcl(char *relname, AclItem *mod_aip, unsigned modechg); extern AclId get_grosysid(char *groname); extern char *get_groname(AclId grosysid); -extern int32 pg_aclcheck(char *relname, char *usename, AclMode mode); -extern int32 pg_ownercheck(const char *usename, const char *value, int cacheid); -extern int32 pg_func_ownercheck(char *usename, char *funcname, +extern int32 pg_aclcheck(char *relname, Oid userid, AclMode mode); +extern int32 pg_ownercheck(Oid userid, const char *value, int cacheid); +extern int32 pg_func_ownercheck(Oid userid, char *funcname, int nargs, Oid *arglist); -extern int32 pg_aggr_ownercheck(char *usename, char *aggname, +extern int32 pg_aggr_ownercheck(Oid userid, char *aggname, Oid basetypeID); #endif /* ACL_H */ |