mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-01-06 15:24:56 +08:00
Portability fixes for Solaris for requirepeer feature patch
per report from Dave Page
This commit is contained in:
parent
cf5305f406
commit
0b4a0868f9
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-connect.c,v 1.402 2010/07/18 17:08:11 tgl Exp $
|
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-connect.c,v 1.403 2010/07/19 18:53:25 petere Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -21,6 +21,9 @@
|
|||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#ifdef HAVE_UCRED_H
|
||||||
|
#include <ucred.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "libpq-fe.h"
|
#include "libpq-fe.h"
|
||||||
#include "libpq-int.h"
|
#include "libpq-int.h"
|
||||||
@ -1789,7 +1792,7 @@ keep_going: /* We will come back to here until there is
|
|||||||
ucred_t *ucred;
|
ucred_t *ucred;
|
||||||
|
|
||||||
ucred = NULL; /* must be initialized to NULL */
|
ucred = NULL; /* must be initialized to NULL */
|
||||||
if (getpeerucred(sock, &ucred) == -1)
|
if (getpeerucred(conn->sock, &ucred) == -1)
|
||||||
{
|
{
|
||||||
appendPQExpBuffer(&conn->errorMessage,
|
appendPQExpBuffer(&conn->errorMessage,
|
||||||
libpq_gettext("could not get peer credentials: %s\n"),
|
libpq_gettext("could not get peer credentials: %s\n"),
|
||||||
|
Loading…
Reference in New Issue
Block a user