From 5ac372fc1a7cc673cc7d4cf26ba651d52495b27a Mon Sep 17 00:00:00 2001 From: Robert Haas Date: Thu, 23 Oct 2014 08:18:45 -0400 Subject: Add a function to get the authenticated user ID. Previously, this was not exposed outside of miscinit.c. It is needed for the pending pg_background patch, and will also be needed for parallelism. Without it, there's no way for a background worker to re-create the exact authentication environment that was present in the process that started it, which could lead to security exposures. --- src/include/miscadmin.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/include/miscadmin.h') diff --git a/src/include/miscadmin.h b/src/include/miscadmin.h index 2ba98856ff2..1558a75fbde 100644 --- a/src/include/miscadmin.h +++ b/src/include/miscadmin.h @@ -283,6 +283,7 @@ extern char *GetUserNameFromId(Oid roleid); extern Oid GetUserId(void); extern Oid GetOuterUserId(void); extern Oid GetSessionUserId(void); +extern Oid GetAuthenticatedUserId(void); extern void GetUserIdAndSecContext(Oid *userid, int *sec_context); extern void SetUserIdAndSecContext(Oid userid, int sec_context); extern bool InLocalUserIdChange(void); -- cgit v1.2.3