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

Commit38ffbb9

Browse files
committed
Back out V6 code, caused postmaster startup failure.
1 parent4bfd1ad commit38ffbb9

File tree

13 files changed

+274
-643
lines changed

13 files changed

+274
-643
lines changed

‎configure.in

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
dnl Process this file with autoconf to produce a configure script.
2-
dnl $Header: /cvsroot/pgsql/configure.in,v 1.220 2002/12/0603:46:24 momjian Exp $
2+
dnl $Header: /cvsroot/pgsql/configure.in,v 1.221 2002/12/0604:37:02 momjian Exp $
33
dnl
44
dnl Developers, please strive to achieve this order:
55
dnl
@@ -1182,7 +1182,6 @@ AC_CONFIG_LINKS([
11821182
src/include/dynloader.h:src/backend/port/dynloader/${template}.h
11831183
src/include/pg_config_os.h:src/include/port/${template}.h
11841184
src/Makefile.port:src/makefiles/Makefile.${template}
1185-
src/interfaces/libpq/v6util.c:src/backend/libpq/v6util.c
11861185
])
11871186

11881187
AC_CONFIG_HEADERS([src/include/pg_config.h],

‎src/backend/libpq/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# Makefile for libpq subsystem (backend half of libpq interface)
55
#
66
# IDENTIFICATION
7-
# $Header: /cvsroot/pgsql/src/backend/libpq/Makefile,v 1.34 2002/12/0603:46:24 momjian Exp $
7+
# $Header: /cvsroot/pgsql/src/backend/libpq/Makefile,v 1.35 2002/12/0604:37:02 momjian Exp $
88
#
99
#-------------------------------------------------------------------------
1010

@@ -15,7 +15,7 @@ include $(top_builddir)/src/Makefile.global
1515
# be-fsstubs is here for historical reasons, probably belongs elsewhere
1616

1717
OBJS = be-fsstubs.o be-secure.o auth.o crypt.o hba.o md5.o pqcomm.o\
18-
pqformat.o pqsignal.o v6util.o
18+
pqformat.o pqsignal.o
1919

2020

2121
all: SUBSYS.o

‎src/backend/libpq/auth.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/libpq/auth.c,v 1.93 2002/12/0603:46:24 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/libpq/auth.c,v 1.94 2002/12/0604:37:02 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -410,12 +410,9 @@ ClientAuthentication(Port *port)
410410
*/
411411
{
412412
constchar*hostinfo="localhost";
413-
charip_hostinfo[INET6_ADDRSTRLEN];
414-
if (isAF_INETx(&port->raddr.sa) ){
415-
hostinfo=SockAddr_ntop(&port->raddr,ip_hostinfo,
416-
INET6_ADDRSTRLEN,1);
417-
}
418413

414+
if (port->raddr.sa.sa_family==AF_INET)
415+
hostinfo=inet_ntoa(port->raddr.in.sin_addr);
419416
elog(FATAL,
420417
"No pg_hba.conf entry for host %s, user %s, database %s",
421418
hostinfo,port->user,port->database);

‎src/backend/libpq/hba.c

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*
1111
*
1212
* IDENTIFICATION
13-
* $Header: /cvsroot/pgsql/src/backend/libpq/hba.c,v 1.89 2002/12/0603:46:26 momjian Exp $
13+
* $Header: /cvsroot/pgsql/src/backend/libpq/hba.c,v 1.90 2002/12/0604:37:02 momjian Exp $
1414
*
1515
*-------------------------------------------------------------------------
1616
*/
@@ -582,8 +582,9 @@ parse_hba(List *line, hbaPort *port, bool *found_p, bool *error_p)
582582
}
583583
elseif (strcmp(token,"host")==0||strcmp(token,"hostssl")==0)
584584
{
585-
SockAddrfile_ip_addr,mask;
586-
585+
structin_addrfile_ip_addr,
586+
mask;
587+
587588
if (strcmp(token,"hostssl")==0)
588589
{
589590
#ifdefUSE_SSL
@@ -618,25 +619,16 @@ parse_hba(List *line, hbaPort *port, bool *found_p, bool *error_p)
618619
if (!line)
619620
gotohba_syntax;
620621
token=lfirst(line);
621-
622-
if(SockAddr_pton(&file_ip_addr,token,strlen(token))<0){
623-
gotohba_syntax;
624-
}
622+
if (!inet_aton(token,&file_ip_addr))
623+
gotohba_syntax;
625624

626625
/* Read the mask field. */
627626
line=lnext(line);
628627
if (!line)
629628
gotohba_syntax;
630629
token=lfirst(line);
631-
632-
if(SockAddr_pton(&mask,token,strlen(token))<0){
633-
gotohba_syntax;
634-
}
635-
636-
637-
if(file_ip_addr.sa.sa_family!=mask.sa.sa_family){
638-
gotohba_syntax;
639-
}
630+
if (!inet_aton(token,&mask))
631+
gotohba_syntax;
640632

641633
/* Read the rest of the line. */
642634
line=lnext(line);
@@ -647,7 +639,8 @@ parse_hba(List *line, hbaPort *port, bool *found_p, bool *error_p)
647639
gotohba_syntax;
648640

649641
/* Must meet network restrictions */
650-
if (!isAF_INETx(&port->raddr)|| !rangeSockAddr(&port->raddr,&file_ip_addr,&mask))
642+
if (port->raddr.sa.sa_family!=AF_INET||
643+
((file_ip_addr.s_addr ^port->raddr.in.sin_addr.s_addr)&mask.s_addr)!=0)
651644
return;
652645
}
653646
else

‎src/backend/libpq/pg_hba.conf.sample

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,5 @@
4444

4545
# TYPE DATABASE USER IP-ADDRESS IP-MASK METHOD
4646

47-
local all all trust
48-
host all all 127.0.0.1 255.255.255.255 trust
49-
host all all ::1 ffff:ffff:ffff:ffff:ffff:ffff trust
47+
local all all trust
48+
host all all 127.0.0.1 255.255.255.255 trust

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp