mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +03:00
Cleanups for large objects, so file is trucated on open, fix for
solaris/spare shared libararies, new error message for postmaster startup, and makefile cleanups.
This commit is contained in:
@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/libpq/be-fsstubs.c,v 1.19 1998/01/07 21:03:12 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/libpq/be-fsstubs.c,v 1.20 1998/05/12 21:43:58 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
* This should be moved to a more appropriate place. It is here
|
||||
@ -344,7 +344,7 @@ lo_export(Oid lobjId, text *filename)
|
||||
*/
|
||||
oumask = umask((mode_t) 0);
|
||||
StrNCpy(fnamebuf, VARDATA(filename), VARSIZE(filename) - VARHDRSZ + 1);
|
||||
fd = open(fnamebuf, O_CREAT | O_WRONLY, 0666);
|
||||
fd = open(fnamebuf, O_CREAT | O_WRONLY | O_TRUNC, 0666);
|
||||
umask(oumask);
|
||||
if (fd < 0)
|
||||
{ /* error */
|
||||
|
@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/main/main.c,v 1.18 1998/04/30 14:25:13 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/main/main.c,v 1.19 1998/05/12 21:43:59 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -31,11 +31,10 @@
|
||||
#include "tcop/tcopprot.h" /* for PostgresMain() */
|
||||
|
||||
#define NOROOTEXEC "\
|
||||
\n\"root\" execution of the PostgreSQL backend is not permitted\n\n\
|
||||
It is highly recommended that the backend be started under it's own userid\n\
|
||||
to prevent possible system security compromise. This can be accomplished\n\
|
||||
by placing the following command in the PostgreSQL startup script.\n\n\
|
||||
echo \"postmaster >/var/log/pglog 2>&1 &\" | su - postgres\n\n"
|
||||
\n\"root\" execution of the PostgreSQL backend is not permitted.\n\n\
|
||||
The backend must be started under it's own userid to prevent\n\
|
||||
a possible system security compromise. See the INSTALL file for\n\
|
||||
more information on how to properly start the postmaster.\n\n"
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
|
@ -7,7 +7,7 @@
|
||||
#
|
||||
#
|
||||
# IDENTIFICATION
|
||||
# $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/Makefile.in,v 1.13 1998/04/27 14:54:50 scrappy Exp $
|
||||
# $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/Makefile.in,v 1.14 1998/05/12 21:44:01 momjian Exp $
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
@ -31,7 +31,7 @@ endif
|
||||
install-shlib-dep :=
|
||||
shlib :=
|
||||
|
||||
LIBPQ = -L $(SRCDIR)/interfaces/libpq -lpq
|
||||
LIBPQ = -L$(SRCDIR)/interfaces/libpq -lpq
|
||||
|
||||
ifeq ($(PORTNAME), linux)
|
||||
LINUX_ELF=@LINUX_ELF@
|
||||
@ -59,6 +59,13 @@ ifeq ($(PORTNAME), i386_solaris)
|
||||
CFLAGS += $(CFLAGS_SL)
|
||||
endif
|
||||
|
||||
ifeq ($(PORTNAME), sparc_solaris)
|
||||
install-shlib-dep := install-shlib
|
||||
shlib := libpgtcl.so.1
|
||||
LDFLAGS_SL = -G
|
||||
CFLAGS += $(CFLAGS_SL)
|
||||
endif
|
||||
|
||||
ifeq ($(PORTNAME), univel)
|
||||
install-shlib-dep := install-shlib
|
||||
shlib := libpgtcl.so.1
|
||||
|
@ -7,7 +7,7 @@
|
||||
#
|
||||
#
|
||||
# IDENTIFICATION
|
||||
# $Header: /cvsroot/pgsql/src/interfaces/libpq/Attic/Makefile.in,v 1.17 1998/05/06 23:51:06 momjian Exp $
|
||||
# $Header: /cvsroot/pgsql/src/interfaces/libpq/Attic/Makefile.in,v 1.18 1998/05/12 21:44:02 momjian Exp $
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
@ -53,6 +53,12 @@ ifeq ($(PORTNAME), i386_solaris)
|
||||
LDFLAGS_SL = -G -z text
|
||||
CFLAGS += $(CFLAGS_SL)
|
||||
endif
|
||||
ifeq ($(PORTNAME), sparc_solaris)
|
||||
install-shlib-dep := install-shlib
|
||||
shlib := libpq.so.$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
|
||||
LDFLAGS_SL = -G
|
||||
CFLAGS += $(CFLAGS_SL)
|
||||
endif
|
||||
ifeq ($(PORTNAME), univel)
|
||||
install-shlib-dep := install-shlib
|
||||
shlib := libpq.so.1
|
||||
|
@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-lobj.c,v 1.11 1997/09/18 20:22:49 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-lobj.c,v 1.12 1998/05/12 21:44:03 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -449,7 +449,7 @@ lo_export(PGconn *conn, Oid lobjId, char *filename)
|
||||
/*
|
||||
* open the file to be written to
|
||||
*/
|
||||
fd = open(filename, O_CREAT | O_WRONLY, 0666);
|
||||
fd = open(filename, O_CREAT | O_WRONLY | O_TRUNC, 0666);
|
||||
if (fd < 0)
|
||||
{ /* error */
|
||||
sprintf(conn->errorMessage,
|
||||
|
@ -1,6 +1,6 @@
|
||||
.\" This is -*-nroff-*-
|
||||
.\" XXX standard disclaimer belongs here....
|
||||
.\" $Header: /cvsroot/pgsql/src/man/Attic/psql.1,v 1.23 1998/01/26 01:42:53 scrappy Exp $
|
||||
.\" $Header: /cvsroot/pgsql/src/man/Attic/psql.1,v 1.24 1998/05/12 21:44:05 momjian Exp $
|
||||
.TH PSQL UNIX 1/20/96 PostgreSQL PostgreSQL
|
||||
.SH NAME
|
||||
psql - run the interactive query front-end
|
||||
@ -298,7 +298,8 @@ Establish a connection to a new database. The previous connection is closed.
|
||||
Perform a frontend copy. This is an operation that runs a SQL COPY command,
|
||||
but instead of the backend reading or writing a specified file, and
|
||||
consequently requiring special user privilege, psql reads or writes the
|
||||
file and routes the data to or from the backend.
|
||||
file and routes the data to or from the backend. The default TAB
|
||||
delimiter is used.
|
||||
.IP "\ed [\fItable\fR]"
|
||||
List tables in the database, or if
|
||||
.IR table
|
||||
|
@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/test/examples/testlo.c,v 1.7 1997/09/25 16:35:50 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/test/examples/testlo.c,v 1.8 1998/05/12 21:44:07 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -168,7 +168,7 @@ exportFile(PGconn *conn, Oid lobjId, char *filename)
|
||||
/*
|
||||
* open the file to be written to
|
||||
*/
|
||||
fd = open(filename, O_CREAT | O_WRONLY, 0666);
|
||||
fd = open(filename, O_CREAT | O_WRONLY | O_TRUNC, 0666);
|
||||
if (fd < 0)
|
||||
{ /* error */
|
||||
fprintf(stderr, "can't open unix file\"%s\"",
|
||||
|
@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/test/examples/Attic/testlo2.c,v 1.6 1997/09/25 16:35:52 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/test/examples/Attic/testlo2.c,v 1.7 1998/05/12 21:44:08 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -164,7 +164,7 @@ exportFile(PGconn *conn, Oid lobjId, char *filename)
|
||||
/*
|
||||
* open the file to be written to
|
||||
*/
|
||||
fd = open(filename, O_CREAT | O_WRONLY, 0666);
|
||||
fd = open(filename, O_CREAT | O_WRONLY | O_TRUNC, 0666);
|
||||
if (fd < 0)
|
||||
{ /* error */
|
||||
fprintf(stderr, "can't open unix file\"%s\"",
|
||||
|
Reference in New Issue
Block a user