pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Eric Hallander <ehallander@tellium.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: ALLOW_ABSOLUTE_DBPATHS
Date: Tue, 26 Nov 2002 23:41:28 -0500
Message-ID: <14137.1038372088@sss.pgh.pa.us> (raw)
In-Reply-To: <3DE25717.3080009@tellium.com>
References: <3DE25717.3080009@tellium.com>

Eric Hallander <ehallander@tellium.com> writes:
> In the following snippet from ./src/backend/commands/dbcommands.c, I 
> cannot see anywhere in the configuration where ALLOW_ABSOLUTE_DBPATHS 
> gets set, and why this wouldn't be the default anyway. I was creating 
> databases fine, but
> it is possible that I exported PGDATA2, and used this, as I see that 
> this ifndef definition does not exist in the environment variable 
> portion of the code.

The default configuration is that you MUST define an environment
variable in the postmaster's environment for each intended database
location, and then identify the location of a specific database by
environment variable name, not actual filesystem path.

There are fairly obvious security reasons for not letting database
creators tell the backend to scribble on any-random-pathname, so I
think this is a reasonable default.  The DBA needs to be able to
restrict the set of allowed database locations.

In the long run we should get rid of this environment-variable-based
mechanism in favor of storing the info in a proper SQL table, but until
someone gets 'round to designing and coding that, I have no desire to
change the current behavior.  Certainly "#define ALLOW_ABSOLUTE_DBPATHS"
is *dangerous*.

			regards, tom lane



view thread (2+ messages)

Message-ID: <14137.1038372088@sss.pgh.pa.us>
Permalink:  ../14137.1038372088@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/14137.1038372088@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, ehallander@tellium.com
  Subject: Re: ALLOW_ABSOLUTE_DBPATHS
  In-Reply-To: <14137.1038372088@sss.pgh.pa.us>
  References: <3DE25717.3080009@tellium.com> <14137.1038372088@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox