diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 1999-06-04 21:13:38 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 1999-06-04 21:13:38 +0000 |
commit | 4cd4a54c80fc1ed7b16039a71706dc80ce5d422e (patch) | |
tree | aeb8e854651dc4d5c6766a92fa0cbf49865ae061 /src/backend | |
parent | 1c3c08053452f342d9cf09aff9a36a5939508412 (diff) | |
download | postgresql-4cd4a54c80fc1ed7b16039a71706dc80ce5d422e.tar.gz postgresql-4cd4a54c80fc1ed7b16039a71706dc80ce5d422e.zip |
Add configurable option controlling security checks in LO functions.
Diffstat (limited to 'src/backend')
-rw-r--r-- | src/backend/libpq/be-fsstubs.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/backend/libpq/be-fsstubs.c b/src/backend/libpq/be-fsstubs.c index 135eb03b2da..443c2db76dc 100644 --- a/src/backend/libpq/be-fsstubs.c +++ b/src/backend/libpq/be-fsstubs.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/libpq/be-fsstubs.c,v 1.34 1999/05/31 22:53:57 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/libpq/be-fsstubs.c,v 1.35 1999/06/04 21:13:38 tgl Exp $ * * NOTES * This should be moved to a more appropriate place. It is here @@ -334,10 +334,12 @@ lo_import(text *filename) LargeObjectDesc *lobj; Oid lobjOid; +#ifndef ALLOW_DANGEROUS_LO_FUNCTIONS if (!superuser()) elog(ERROR, "You must have Postgres superuser privilege to use " "server-side lo_import().\n\tAnyone can use the " "client-side lo_import() provided by libpq."); +#endif /* * open the file to be read in @@ -405,10 +407,12 @@ lo_export(Oid lobjId, text *filename) LargeObjectDesc *lobj; mode_t oumask; +#ifndef ALLOW_DANGEROUS_LO_FUNCTIONS if (!superuser()) elog(ERROR, "You must have Postgres superuser privilege to use " "server-side lo_export().\n\tAnyone can use the " "client-side lo_export() provided by libpq."); +#endif /* * open the inversion "object" |