diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/libpq/be-secure.c | 25 | ||||
-rw-r--r-- | src/backend/port/Makefile | 24 | ||||
-rw-r--r-- | src/bin/pg_dump/Makefile | 19 | ||||
-rw-r--r-- | src/bin/psql/Makefile | 39 | ||||
-rw-r--r-- | src/interfaces/ecpg/preproc/Makefile | 19 | ||||
-rw-r--r-- | src/utils/Makefile | 4 |
6 files changed, 35 insertions, 95 deletions
diff --git a/src/backend/libpq/be-secure.c b/src/backend/libpq/be-secure.c index 5f63e61c5d4..bfd5ffde15c 100644 --- a/src/backend/libpq/be-secure.c +++ b/src/backend/libpq/be-secure.c @@ -11,7 +11,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/libpq/be-secure.c,v 1.10 2002/06/20 20:29:28 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/libpq/be-secure.c,v 1.11 2002/07/15 21:34:04 momjian Exp $ * * Since the server static private key ($DataDir/server.key) * will normally be stored unencrypted so that the database @@ -41,7 +41,7 @@ * * ... * - * Because the risk of cryptanalysis increases as large + * Because the risk of cryptanalysis increases as large * amounts of data are sent with the same session key, the * session keys are periodically renegotiated. * @@ -50,7 +50,7 @@ * [*] existing SSL code pulled out of existing files. * [*] SSL_get_error() after SSL_read() and SSL_write(), * SSL_shutdown(), default to TLSv1. - * + * * milestone 2: provide endpoint authentication (server) * [*] client verifies server cert * [*] client verifies server hostname @@ -100,7 +100,6 @@ #include <arpa/inet.h> #endif - #ifndef HAVE_STRDUP #include "strdup.h" #endif @@ -153,20 +152,20 @@ static SSL_CTX *SSL_context = NULL; * As discussed above, EDH protects the confidentiality of * sessions even if the static private key is compromised, * so we are *highly* motivated to ensure that we can use - * EDH even if the DBA... or an attacker... deletes the + * EDH even if the DBA... or an attacker... deletes the * $DataDir/dh*.pem files. * * We could refuse SSL connections unless a good DH parameter * file exists, but some clients may quietly renegotiate an * unsecured connection without fully informing the user. - * Very uncool. + * Very uncool. * * Alternately, the backend could attempt to load these files * on startup if SSL is enabled - and refuse to start if any * do not exist - but this would tend to piss off DBAs. * * If you want to create your own hardcoded DH parameters - * for fun and profit, review "Assigned Number for SKIP + * for fun and profit, review "Assigned Number for SKIP * Protocols" (http://www.skip-vpn.org/spec/numbers.html) * for suggestions. */ @@ -241,7 +240,7 @@ secure_destroy (void) /* * Attempt to negotiate secure session. */ -int +int secure_open_server (Port *port) { int r = 0; @@ -373,7 +372,7 @@ secure_write (Port *port, const void *ptr, size_t len) * Load precomputed DH parameters. * * To prevent "downgrade" attacks, we perform a number of checks - * to verify that the DBA-generated DH parameters file contains + * to verify that the DBA-generated DH parameters file contains * what we expect it to contain. */ static DH * @@ -415,7 +414,7 @@ load_dh_file (int keylength) elog(LOG, "DH error (%s): p is not prime", fnbuf); return NULL; } - if ((codes & DH_NOT_SUITABLE_GENERATOR) && + if ((codes & DH_NOT_SUITABLE_GENERATOR) && (codes & DH_CHECK_P_NOT_SAFE_PRIME)) { elog(LOG, @@ -520,7 +519,7 @@ tmp_dh_cb (SSL *s, int is_export, int keylength) elog(DEBUG1, "DH: generating parameters (%d bits)....", keylength); r = DH_generate_parameters(keylength, DH_GENERATOR_2, NULL, NULL); } - + return r; } @@ -585,7 +584,7 @@ initialize_SSL (void) { char fnbuf[2048]; struct stat buf; - + if (!SSL_context) { SSL_library_init(); @@ -648,7 +647,7 @@ initialize_SSL (void) fnbuf, SSLerrmessage()); ExitPostmaster(1); } - SSL_CTX_set_verify(SSL_context, + SSL_CTX_set_verify(SSL_context, SSL_VERIFY_PEER | SSL_VERIFY_CLIENT_ONCE, verify_cb); return 0; diff --git a/src/backend/port/Makefile b/src/backend/port/Makefile index 6979cf19739..c176a727b73 100644 --- a/src/backend/port/Makefile +++ b/src/backend/port/Makefile @@ -13,7 +13,7 @@ # be converted to Method 2. # # IDENTIFICATION -# $Header: /cvsroot/pgsql/src/backend/port/Makefile,v 1.13 2002/05/05 16:02:37 tgl Exp $ +# $Header: /cvsroot/pgsql/src/backend/port/Makefile,v 1.14 2002/07/15 21:34:04 momjian Exp $ # #------------------------------------------------------------------------- @@ -21,25 +21,22 @@ subdir = src/backend/port top_builddir = ../../.. include $(top_builddir)/src/Makefile.global -OBJS = dynloader.o pg_sema.o pg_shmem.o +OBJS=dynloader.o pg_sema.o pg_shmem.o -OBJS += $(GETHOSTNAME) $(GETRUSAGE) $(INET_ATON) $(ISINF) $(MEMCMP) \ - $(MISSING_RANDOM) $(SNPRINTF) $(SRANDOM) $(STRCASECMP) $(STRERROR) \ - $(STRTOL) $(STRTOUL) +OBJS+=$(GETHOSTNAME) $(GETRUSAGE) $(INET_ATON) $(ISINF) $(MEMCMP) \ + $(MISSING_RANDOM) $(SNPRINTF) $(SRANDOM) $(STRCASECMP) $(STRDUP) \ + $(STRERROR) $(STRTOL) $(STRTOUL) -OBJS += $(TAS) +OBJS+=$(TAS) -ifdef STRDUP -OBJS += $(top_builddir)/src/utils/strdup.o -endif ifeq ($(PORTNAME), qnx4) -OBJS += getrusage.o qnx4/SUBSYS.o +OBJS+=getrusage.o qnx4/SUBSYS.o endif ifeq ($(PORTNAME), beos) -OBJS += beos/SUBSYS.o +OBJS+=beos/SUBSYS.o endif ifeq ($(PORTNAME), darwin) -OBJS += darwin/SUBSYS.o +OBJS+=darwin/SUBSYS.o endif all: SUBSYS.o @@ -47,9 +44,6 @@ all: SUBSYS.o SUBSYS.o: $(OBJS) $(LD) $(LDREL) $(LDOUT) $@ $^ -$(top_builddir)/src/utils/strdup.o: - $(MAKE) -C $(top_builddir)/src/utils strdup.o - qnx4/SUBSYS.o: qnx4.dir qnx4.dir: diff --git a/src/bin/pg_dump/Makefile b/src/bin/pg_dump/Makefile index 3df5ff6d4a0..1a19c71fc26 100644 --- a/src/bin/pg_dump/Makefile +++ b/src/bin/pg_dump/Makefile @@ -5,7 +5,7 @@ # Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group # Portions Copyright (c) 1994, Regents of the University of California # -# $Header: /cvsroot/pgsql/src/bin/pg_dump/Makefile,v 1.34 2002/07/06 20:12:30 momjian Exp $ +# $Header: /cvsroot/pgsql/src/bin/pg_dump/Makefile,v 1.35 2002/07/15 21:34:05 momjian Exp $ # #------------------------------------------------------------------------- @@ -14,21 +14,8 @@ top_builddir = ../../.. include $(top_builddir)/src/Makefile.global OBJS= pg_backup_archiver.o pg_backup_db.o pg_backup_custom.o \ - pg_backup_files.o pg_backup_null.o pg_backup_tar.o sprompt.o - -ifdef STRDUP -OBJS+=$(top_builddir)/src/utils/strdup.o - -$(top_builddir)/src/utils/strdup.o: - $(MAKE) -C $(top_builddir)/src/utils strdup.o -endif - -ifdef STRTOUL -OBJS+=$(top_builddir)/src/backend/port/strtoul.o - -$(top_builddir)/src/backend/port/strtoul.o: - $(MAKE) -C $(top_builddir)/src/backend/port strtoul.o -endif + pg_backup_files.o pg_backup_null.o pg_backup_tar.o sprompt.o \ + $(STRDUP) $(STRTOUL) override CPPFLAGS := -I$(libpq_srcdir) $(CPPFLAGS) diff --git a/src/bin/psql/Makefile b/src/bin/psql/Makefile index 8a7416a89c2..5baa463bbc1 100644 --- a/src/bin/psql/Makefile +++ b/src/bin/psql/Makefile @@ -5,7 +5,7 @@ # Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group # Portions Copyright (c) 1994, Regents of the University of California # -# $Header: /cvsroot/pgsql/src/bin/psql/Makefile,v 1.33 2002/07/06 20:12:30 momjian Exp $ +# $Header: /cvsroot/pgsql/src/bin/psql/Makefile,v 1.34 2002/07/15 21:34:05 momjian Exp $ # #------------------------------------------------------------------------- @@ -17,42 +17,13 @@ REFDOCDIR= $(top_srcdir)/doc/src/sgml/ref override CPPFLAGS := -I$(libpq_srcdir) $(CPPFLAGS) -OBJS=command.o common.o help.o input.o stringutils.o mainloop.o \ - copy.o startup.o prompt.o variables.o large_obj.o print.o describe.o \ - sprompt.o tab-complete.o mbprint.o +OBJS=command.o common.o help.o input.o stringutils.o mainloop.o copy.o \ + startup.o prompt.o variables.o large_obj.o print.o describe.o \ + sprompt.o tab-complete.o mbprint.o $(SNPRINTF) $(STRDUP) \ + $(STRERROR) $(STRTOUL) all: submake psql -ifdef STRDUP -OBJS+=$(top_builddir)/src/utils/strdup.o - -$(top_builddir)/src/utils/strdup.o: - $(MAKE) -C $(top_builddir)/src/utils strdup.o -endif - -# Move these to the utils directory? - -ifdef STRERROR -OBJS+=$(top_builddir)/src/backend/port/strerror.o - -$(top_builddir)/src/backend/port/strerror.o: - $(MAKE) -C $(top_builddir)/src/backend/port strerror.o -endif - -ifdef SNPRINTF -OBJS+=$(top_builddir)/src/backend/port/snprintf.o - -$(top_builddir)/src/backend/port/snprintf.o: - $(MAKE) -C $(top_builddir)/src/backend/port snprintf.o -endif - -ifdef STRTOUL -OBJS+=$(top_builddir)/src/backend/port/strtoul.o - -$(top_builddir)/src/backend/port/strtoul.o: - $(MAKE) -C $(top_builddir)/src/backend/port strtoul.o -endif - # End of hacks for picking up backend 'port' modules psql: $(OBJS) $(libpq_builddir)/libpq.a diff --git a/src/interfaces/ecpg/preproc/Makefile b/src/interfaces/ecpg/preproc/Makefile index 823ace5929f..212b3cc8a6a 100644 --- a/src/interfaces/ecpg/preproc/Makefile +++ b/src/interfaces/ecpg/preproc/Makefile @@ -1,4 +1,4 @@ -# $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/Makefile,v 1.83 2002/03/11 12:56:02 meskes Exp $ +# $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/Makefile,v 1.84 2002/07/15 21:34:05 momjian Exp $ subdir = src/interfaces/ecpg/preproc top_builddir = ../../../.. @@ -18,24 +18,11 @@ override CFLAGS += -Wno-error endif OBJS=preproc.o pgc.o type.o ecpg.o ecpg_keywords.o output.o\ - keywords.o c_keywords.o ../lib/typename.o descriptor.o variable.o + keywords.o c_keywords.o ../lib/typename.o descriptor.o variable.o \ + $(SNPRINTF) $(STRDUP) all: ecpg -ifdef SNPRINTF -OBJS+=$(top_builddir)/src/backend/port/snprintf.o - -$(top_builddir)/src/backend/port/snprintf.o: - $(MAKE) -C $(top_builddir)/src/backend/port snprintf.o -endif - -ifdef STRDUP -OBJS+=$(top_builddir)/src/utils/strdup.o - -$(top_builddir)/src/utils/strdup.o: - $(MAKE) -C $(top_builddir)/src/utils strdup.o -endif - ecpg: $(OBJS) $(CC) $(CFLAGS) $(LDFLAGS) $^ $(LIBS) -o $@ diff --git a/src/utils/Makefile b/src/utils/Makefile index dc2c2b4908e..95a0fc11c61 100644 --- a/src/utils/Makefile +++ b/src/utils/Makefile @@ -2,7 +2,7 @@ # # Makefile for utils # -# $Header: /cvsroot/pgsql/src/utils/Attic/Makefile,v 1.9 2000/08/31 16:12:35 petere Exp $ +# $Header: /cvsroot/pgsql/src/utils/Attic/Makefile,v 1.10 2002/07/15 21:34:05 momjian Exp $ # # About strdup: Some systems have strdup in their standard library, others # don't. Ones that don't will use this make file to compile the strdup.c @@ -22,6 +22,8 @@ top_builddir = ../.. include $(top_builddir)/src/Makefile.global all: + # Nothing required here. These C files are compiled in + # directories as needed. clean distclean maintainer-clean: rm -f dllinit.o getopt.o strdup.o |