Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1aadc50

Browse files
committed
Remove obsolete comment and code from fe-auth.c.
We don't use getpwuid() anymore (see commite757cdd), so we don't needlocking 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 parent8d9a9f0 commit1aadc50

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
charpwdbuf[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
#ifdefWIN32
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
returnresult;
12151204
}
12161205

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp