diff --git a/src/backend/libpq/hba.c b/src/backend/libpq/hba.c index 76a3ca63fe44867cc05cc5942837534106d3c41f..2dd44a97bfaa7b16a2fea7d131968d84b56ec9c4 100644 --- a/src/backend/libpq/hba.c +++ b/src/backend/libpq/hba.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/libpq/hba.c,v 1.13 1996/11/27 08:15:16 bryanh Exp $ + * $Header: /cvsroot/pgsql/src/backend/libpq/hba.c,v 1.14 1997/01/10 17:39:29 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -500,7 +500,7 @@ ident(const struct in_addr remote_ip_addr, const struct in_addr local_ip_addr, *ident_failed = true; } else { char ident_response[80+IDENT_USERNAME_MAX]; - rc = recv(sock_fd, ident_response, sizeof(ident_response), 0); + rc = recv(sock_fd, ident_response, sizeof(ident_response)-1, 0); if (rc < 0) { sprintf(PQerrormsg, "Unable to receive response from Ident server " @@ -515,6 +515,7 @@ ident(const struct in_addr remote_ip_addr, const struct in_addr local_ip_addr, *ident_failed = true; } else { bool error; /* response from Ident is garbage. */ + ident_response[rc] = '\0'; interpret_ident_response(ident_response, &error, ident_username); *ident_failed = error; } diff --git a/src/bin/initdb/initdb.sh b/src/bin/initdb/initdb.sh index f0c406586d746ab5db557cfaa5fc774004de5edc..c0b9512b2fc90de766704e226198944a56d6b782 100644 --- a/src/bin/initdb/initdb.sh +++ b/src/bin/initdb/initdb.sh @@ -26,7 +26,7 @@ # # # IDENTIFICATION -# $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.20 1996/12/23 08:50:27 bryanh Exp $ +# $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.21 1997/01/10 17:39:40 momjian Exp $ # #------------------------------------------------------------------------- @@ -217,9 +217,9 @@ echo # umask must disallow access to group, other for files and dirs umask 077 -if [ -d "$PGDATA" ]; then +if [ -f "$PGDATA/PG_VERSION" ]; then if [ $template_only -eq 0 ]; then - echo "$CMDNAME: error: Directory $PGDATA already exists." + echo "$CMDNAME: error: File $PGDATA/PG_VERSION already exists." echo "This probably means initdb has already been run and the " echo "database system already exists." echo diff --git a/src/include/catalog/pg_attribute.h b/src/include/catalog/pg_attribute.h index 56d7bae7ee9ec0afa759c40cecc54ca3b3a8edff..59564f7627f87c1569355affaaa49864bff1886c 100644 --- a/src/include/catalog/pg_attribute.h +++ b/src/include/catalog/pg_attribute.h @@ -7,7 +7,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: pg_attribute.h,v 1.4 1996/11/13 20:50:54 scrappy Exp $ + * $Id: pg_attribute.h,v 1.5 1997/01/10 17:39:50 momjian Exp $ * * NOTES * the genbki.sh script reads this file and generates .bki @@ -185,10 +185,10 @@ DATA(insert OID = 0 ( 1247 typisdefined 16 0 0 0 1 7 0 t t 0 0 -1 f c)); DATA(insert OID = 0 ( 1247 typdelim 18 0 0 0 1 8 0 t t 0 0 -1 f c)); DATA(insert OID = 0 ( 1247 typrelid 26 0 0 0 4 9 0 t t 0 0 -1 f i)); DATA(insert OID = 0 ( 1247 typelem 26 0 0 0 4 10 0 t t 0 0 -1 f i)); -DATA(insert OID = 0 ( 1247 typinput 26 0 0 0 4 11 0 t t 0 0 -1 f i)); -DATA(insert OID = 0 ( 1247 typoutput 26 0 0 0 4 12 0 t t 0 0 -1 f i)); -DATA(insert OID = 0 ( 1247 typreceive 26 0 0 0 4 13 0 t t 0 0 -1 f i)); -DATA(insert OID = 0 ( 1247 typsend 26 0 0 0 4 14 0 t t 0 0 -1 f i)); +DATA(insert OID = 0 ( 1247 typinput 24 0 0 0 4 11 0 t t 0 0 -1 f i)); +DATA(insert OID = 0 ( 1247 typoutput 24 0 0 0 4 12 0 t t 0 0 -1 f i)); +DATA(insert OID = 0 ( 1247 typreceive 24 0 0 0 4 13 0 t t 0 0 -1 f i)); +DATA(insert OID = 0 ( 1247 typsend 24 0 0 0 4 14 0 t t 0 0 -1 f i)); DATA(insert OID = 0 ( 1247 typalign 18 0 0 0 1 15 0 t t 0 0 -1 f c)); DATA(insert OID = 0 ( 1247 typdefault 25 0 0 0 -1 16 0 f t 0 0 -1 f i)); DATA(insert OID = 0 ( 1247 ctid 27 0 0 0 6 -1 0 f t 0 0 -1 f i)); diff --git a/src/interfaces/libpgtcl/Makefile b/src/interfaces/libpgtcl/Makefile index cc9e554caf3fe56647e5a731f8f8a322f493a894..c7d35a0417d5166a51355e6236884197720caaf5 100644 --- a/src/interfaces/libpgtcl/Makefile +++ b/src/interfaces/libpgtcl/Makefile @@ -7,7 +7,7 @@ # # # IDENTIFICATION -# $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/Makefile,v 1.6 1996/11/13 10:35:31 bryanh Exp $ +# $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/Makefile,v 1.7 1997/01/10 17:40:07 momjian Exp $ # #------------------------------------------------------------------------- @@ -31,7 +31,16 @@ endif OBJS= pgtcl.o pgtclCmds.o pgtclId.o -all: libpgtcl.a +ifdef LINUX_ELF + shlib := libpgtcl.so.1 + install-shlib-dep := install-shlib + LDFLAGS += -L ../libpq -lpq +else + shlib := + install-shlib-dep := +endif + +all: libpgtcl.a $(shlib) libpgtcl.a: $(OBJS) ifdef MK_NO_LORDER @@ -41,10 +50,15 @@ else endif $(RANLIB) libpgtcl.a +libpgtcl.so.1: $(OBJS) + $(CC) $(LDFLAGS) -shared $(OBJS) -o libpgtcl.so.1 + rm -f libpgtcl.so + ln -s libpgtcl.so.1 libpgtcl.so + .PHONY: beforeinstall-headers install-headers .PHONY: install install-libpgtcl -install: install-headers install-libpgtcl +install: install-headers install-libpgtcl $(install-shlib-dep) install-headers: beforeinstall-headers libpgtcl.h $(INSTALL) $(INSTLOPTS) libpgtcl.h $(HEADERDIR)/libpgtcl.h @@ -55,6 +69,12 @@ beforeinstall-headers: install-libpgtcl: libpgtcl.a $(INSTALL) $(INSTL_LIB_OPTS) libpgtcl.a $(DESTDIR)$(LIBDIR)/libpgtcl.a +install-shlib: libpgtcl.so.1 + $(INSTALL) $(INSTL_LIB_OPTS) libpgtcl.so.1 \ + $(DESTDIR)$(LIBDIR)/libpgtcl.so + rm -f $(DESTDIR)$(LIBDIR)/libpgtcl.so + ln -s libpgtcl.so.1 $(DESTDIR)$(LIBDIR)/libpgtcl.so + .PHONY: clean clean: rm -f $(OBJS)