aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/libpq/fe-auth.c
diff options
context:
space:
mode:
authorThomas Munro <tmunro@postgresql.org>2023-07-09 15:52:28 +1200
committerThomas Munro <tmunro@postgresql.org>2023-07-09 16:05:34 +1200
commit1aadc504bf47ade96178b98fe80803f244c1ee28 (patch)
tree76d720d3f9b4df21217f63e8c23ca962498a62f9 /src/interfaces/libpq/fe-auth.c
parent8d9a9f034e925568342c7ccfd8d351a3cd20e7f3 (diff)
downloadpostgresql-1aadc504bf47ade96178b98fe80803f244c1ee28.tar.gz
postgresql-1aadc504bf47ade96178b98fe80803f244c1ee28.zip
Remove obsolete comment and code from fe-auth.c.
We don't use getpwuid() anymore (see commit e757cdd6), so we don't need locking around pg_get_user_name(). Reviewed-by: Andres Freund <andres@anarazel.de> Reviewed-by: Peter Eisentraut <peter@eisentraut.org> Reviewed-by: Heikki Linnakangas <hlinnaka@iki.fi> Discussion: https://postgr.es/m/CA%2BhUKGLtmexrpMtxBRLCVePqV_dtWG-ZsEbyPrYc%2BNBB2TkNsw%40mail.gmail.com
Diffstat (limited to 'src/interfaces/libpq/fe-auth.c')
-rw-r--r--src/interfaces/libpq/fe-auth.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/src/interfaces/libpq/fe-auth.c b/src/interfaces/libpq/fe-auth.c
index f8e09d3b415..3ed8c6c89ba 100644
--- a/src/interfaces/libpq/fe-auth.c
+++ b/src/interfaces/libpq/fe-auth.c
@@ -1179,15 +1179,6 @@ pg_fe_getusername(uid_t user_id, PQExpBuffer errorMessage)
char pwdbuf[BUFSIZ];
#endif
- /*
- * Some users are using configure --enable-thread-safety-force, so we
- * might as well do the locking within our library to protect getpwuid().
- * In fact, application developers can use getpwuid() in their application
- * if they use the locking call we provide, or install their own locking
- * function using PQregisterThreadLock().
- */
- pglock_thread();
-
#ifdef WIN32
if (GetUserName(username, &namesize))
name = username;
@@ -1209,8 +1200,6 @@ pg_fe_getusername(uid_t user_id, PQExpBuffer errorMessage)
libpq_append_error(errorMessage, "out of memory");
}
- pgunlock_thread();
-
return result;
}