1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-05 07:21:24 +03:00

Implement differentiation between CURRENT_USER and SESSION_USER as per SQL.

There is still no effective difference but it will kick in once setuid
functions exist (not included here).  Make old getpgusername() alias for
current_user.
This commit is contained in:
Peter Eisentraut
2000-09-19 18:18:04 +00:00
parent e9c3f0255f
commit 457ac0331c
12 changed files with 166 additions and 65 deletions

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.65 2000/09/06 14:15:22 petere Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.66 2000/09/19 18:17:57 petere Exp $
*
*
*-------------------------------------------------------------------------
@ -374,9 +374,9 @@ InitPostgres(const char *dbname, const char *username)
* user id.
*/
if (bootstrap)
SetUserId(geteuid());
SetSessionUserId(geteuid());
else
SetUserIdFromUserName(username);
SetSessionUserIdFromUserName(username);
setuid(geteuid());