Skip to content

Commit 1aadc50

Browse files
committed
Remove obsolete comment and code from fe-auth.c.
We don't use getpwuid() anymore (see commit e757cdd), 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
1 parent 8d9a9f0 commit 1aadc50

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

src/interfaces/libpq/fe-auth.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1179,15 +1179,6 @@ pg_fe_getusername(uid_t user_id, PQExpBuffer errorMessage)
11791179
char pwdbuf[BUFSIZ];
11801180
#endif
11811181

1182-
/*
1183-
* Some users are using configure --enable-thread-safety-force, so we
1184-
* might as well do the locking within our library to protect getpwuid().
1185-
* In fact, application developers can use getpwuid() in their application
1186-
* if they use the locking call we provide, or install their own locking
1187-
* function using PQregisterThreadLock().
1188-
*/
1189-
pglock_thread();
1190-
11911182
#ifdef WIN32
11921183
if (GetUserName(username, &namesize))
11931184
name = username;
@@ -1209,8 +1200,6 @@ pg_fe_getusername(uid_t user_id, PQExpBuffer errorMessage)
12091200
libpq_append_error(errorMessage, "out of memory");
12101201
}
12111202

1212-
pgunlock_thread();
1213-
12141203
return result;
12151204
}
12161205

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy