Skip site navigation (1) Skip section navigation (2)

Re: use GUC for cmdline

From: Marko Kreen <marko(at)l-t(dot)ee>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, pgsql-patches(at)postgresql(dot)org
Subject: Re: use GUC for cmdline
Date: 2001-06-22 00:36:40
Message-ID: 20010622023640.A12679@l-t.ee (view raw or flat)
Thread:
Lists: pgsql-patches
On Thu, Jun 21, 2001 at 07:50:44PM -0400, Tom Lane wrote:
> Marko Kreen <marko(at)l-t(dot)ee> writes:
> >> This seems like an appropriate fix.  I would recommend doing the same
> >> with all the option switch settings that are protected with "if
> >> (secure)".  This is not a hack: essentially it says we will treat
> >> options passed to the postmaster with -o as postmaster-time options.
> 
> > -				if (secure)
> > -					SetConfigOption("shared_buffers", optarg, ctx, true);
> > +				SetConfigOption("shared_buffers", optarg, secure_ctx, true);
> 
> Uh, removing the security checks is NOT what I had in mind.  Wasn't
> my example clear enough?

Ee, this is done in set_config_option?

secure_ctx = PGC_POSTMASTER until '-p' then it will
get ordinary 'ctx'.  This should follow use of secure.
Ofcourse this assumes all GUC vars you want to protect
with 'secure' have PGC_POSTMASTER/PGC_SIGHUP as context.
Wont it be true?

-- 
marko


In response to

Responses

pgsql-patches by date

Next:From: Tom LaneDate: 2001-06-22 01:09:20
Subject: Re: use GUC for cmdline
Previous:From: Dave CramerDate: 2001-06-22 00:33:59
Subject: Re: Re: [ADMIN] High memory usage [PATCH]

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group