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:
@ -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());
|
||||
|
||||
|
Reference in New Issue
Block a user