]> granicus.if.org Git - postgresql/commitdiff
Add SO_PEERCRED check in new unix domain socket permission checking code.
authorBruce Momjian <bruce@momjian.us>
Sun, 18 Jul 2010 15:51:00 +0000 (15:51 +0000)
committerBruce Momjian <bruce@momjian.us>
Sun, 18 Jul 2010 15:51:00 +0000 (15:51 +0000)
src/interfaces/libpq/fe-connect.c

index 2b99f03cc41f9fcff1a8de3ae8ee6a038f95ac97..ef0a655763ae6e41ca3c5bcbef2a51647acc5d17 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *       $PostgreSQL: pgsql/src/interfaces/libpq/fe-connect.c,v 1.399 2010/07/18 11:37:26 petere Exp $
+ *       $PostgreSQL: pgsql/src/interfaces/libpq/fe-connect.c,v 1.400 2010/07/18 15:51:00 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -1816,8 +1816,12 @@ keep_going:                                              /* We will come back to here until there is
                                        if (pass == NULL)
                                        {
                                                appendPQExpBuffer(&conn->errorMessage,
+# if defined(SO_PEERCRED)
                                                                                  libpq_gettext("local user with ID %d does not exist\n"),
                                                                                                                (int) peercred.uid);
+#else
+                                                                                 libpq_gettext("matching local user does not exist\n"));
+#endif
                                                goto error_return;
                                        }