Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
4cd4a54c
Commit
4cd4a54c
authored
Jun 04, 1999
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add configurable option controlling security checks in LO functions.
parent
1c3c0805
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
2 deletions
+16
-2
src/backend/libpq/be-fsstubs.c
src/backend/libpq/be-fsstubs.c
+5
-1
src/include/config.h.in
src/include/config.h.in
+11
-1
No files found.
src/backend/libpq/be-fsstubs.c
View file @
4cd4a54c
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/libpq/be-fsstubs.c,v 1.3
4 1999/05/31 22:53:57
tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/libpq/be-fsstubs.c,v 1.3
5 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\t
Anyone 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\t
Anyone can use the "
"client-side lo_export() provided by libpq."
);
#endif
/*
* open the inversion "object"
...
...
src/include/config.h.in
View file @
4cd4a54c
...
...
@@ -342,7 +342,7 @@ extern void srandom(unsigned int seed);
#undef USE_POSIX_SIGNALS
/*
*
Code below this point should not require changes
*
Pull in OS-specific declarations (using link created by configure)
*/
#include "os.h"
...
...
@@ -494,6 +494,16 @@ extern void srandom(unsigned int seed);
*/
/* #define PSQL_ALWAYS_GET_PASSWORDS */
/*
* Define this if you want to allow the lo_import and lo_export SQL functions
* to be executed by ordinary users. By default these functions are only
* available to the Postgres superuser. CAUTION: these functions are
* SECURITY HOLES since they can read and write any file that the Postgres
* backend has permission to access. If you turn this on, don't say we
* didn't warn you.
*/
/* #define ALLOW_DANGEROUS_LO_FUNCTIONS */
/*
* Use btree bulkload code:
* this code is moderately slow (~10% slower) compared to the regular
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment