Digging through previous discussion of this patch, I note where Peter E.
points out how silly it is to use Autoconf to test for a preprocessor symbol, when one can equally easily #ifdef on the symbol itself. Accordingly, revert configure to prior state and do it that way.
This commit is contained in:
parent
bc042e0a77
commit
cb90b2dacb
4 changed files with 148 additions and 185 deletions
13
configure.in
13
configure.in
|
@ -801,19 +801,6 @@ AC_CHECK_FUNCS([fcvt getopt_long memmove pstat setproctitle setsid sigprocmask s
|
|||
dnl Check whether <unistd.h> declares fdatasync().
|
||||
AC_EGREP_HEADER(fdatasync, unistd.h, AC_DEFINE(HAVE_FDATASYNC_DECL))
|
||||
|
||||
AC_MSG_CHECKING([for SO_PEERCRED])
|
||||
AC_EGREP_CPP(HAVE_SO_PEERCRED,
|
||||
#include <sys/socket.h>
|
||||
#ifdef SO_PEERCRED
|
||||
HAVE_SO_PEERCRED
|
||||
#endif
|
||||
],
|
||||
[
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_SO_PEERCRED)
|
||||
],
|
||||
[AC_MSG_RESULT(no)])
|
||||
|
||||
AC_CACHE_CHECK([for PS_STRINGS], [pgac_cv_var_PS_STRINGS],
|
||||
[AC_TRY_LINK(
|
||||
[#include <machine/vmparam.h>
|
||||
|
|
|
@ -5,7 +5,12 @@
|
|||
* wherein you authenticate a user by seeing what IP address the system
|
||||
* says he comes from and possibly using ident).
|
||||
*
|
||||
* $Id: hba.c,v 1.58 2001/08/01 23:25:39 tgl Exp $
|
||||
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/libpq/hba.c,v 1.59 2001/08/01 23:52:50 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
|
@ -292,7 +297,7 @@ parse_hba(List *line, hbaPort *port, bool *found_p, bool *error_p)
|
|||
if (port->auth_method == uaKrb4 ||
|
||||
port->auth_method == uaKrb5)
|
||||
goto hba_syntax;
|
||||
#ifndef HAVE_SO_PEERCRED
|
||||
#ifndef SO_PEERCRED
|
||||
if (port->auth_method == uaIdent)
|
||||
{
|
||||
/* Give a special error message for this case... */
|
||||
|
@ -861,7 +866,8 @@ ident_inet(const struct in_addr remote_ip_addr,
|
|||
return ident_return;
|
||||
}
|
||||
|
||||
#ifdef HAVE_SO_PEERCRED
|
||||
#ifdef SO_PEERCRED
|
||||
|
||||
/*
|
||||
* Ask kernel about the credentials of the connecting process and
|
||||
* determine the symbolic name of the corresponding user.
|
||||
|
@ -923,7 +929,8 @@ ident_unix(int sock, char *ident_user)
|
|||
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* SO_PEERCRED */
|
||||
|
||||
/*
|
||||
* Determine the username of the initiator of the connection described
|
||||
|
@ -947,7 +954,7 @@ authident(hbaPort *port)
|
|||
port->laddr.in.sin_port, ident_user))
|
||||
return STATUS_ERROR;
|
||||
break;
|
||||
#ifdef HAVE_SO_PEERCRED
|
||||
#ifdef SO_PEERCRED
|
||||
case AF_UNIX:
|
||||
if (!ident_unix(port->sock, ident_user))
|
||||
return STATUS_ERROR;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
* or in config.h afterwards. Of course, if you edit config.h, then your
|
||||
* changes will be overwritten the next time you run configure.
|
||||
*
|
||||
* $Id: config.h.in,v 1.169 2001/08/01 23:25:39 tgl Exp $
|
||||
* $Id: config.h.in,v 1.170 2001/08/01 23:52:50 tgl Exp $
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_H
|
||||
|
@ -685,9 +685,6 @@ extern int fdatasync(int fildes);
|
|||
/* Define if you have on_exit() */
|
||||
#undef HAVE_ON_EXIT
|
||||
|
||||
/* Define if you have SO_PEERCRED */
|
||||
#undef HAVE_SO_PEERCRED
|
||||
|
||||
/*
|
||||
*------------------------------------------------------------------------
|
||||
* Part 4: pull in system-specific declarations.
|
||||
|
|
Loading…
Reference in a new issue