Skip to content

Commit 9c5ea83

Browse files
committed
Add SO_PEERCRED check in new unix domain socket permission checking code.
1 parent 040aee2 commit 9c5ea83

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/interfaces/libpq/fe-connect.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-connect.c,v 1.399 2010/07/18 11:37:26 petere Exp $
11+
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-connect.c,v 1.400 2010/07/18 15:51:00 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -1816,8 +1816,12 @@ PQconnectPoll(PGconn *conn)
18161816
if (pass == NULL)
18171817
{
18181818
appendPQExpBuffer(&conn->errorMessage,
1819+
# if defined(SO_PEERCRED)
18191820
libpq_gettext("local user with ID %d does not exist\n"),
18201821
(int) peercred.uid);
1822+
#else
1823+
libpq_gettext("matching local user does not exist\n"));
1824+
#endif
18211825
goto error_return;
18221826
}
18231827

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