Re: [HACKERS] Re: initdb.sh fixed7

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: [HACKERS] Re: initdb.sh fixed7
Date: 1999-12-20 02:17:53
Message-ID: 199912200217.VAA19819@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> > > 'insert ( data data data )' bootstrap commands are containing gaps. On the
> > > other hand, this was one of the key things that were supposed to be
> > > improved because relying on $USER was not su-safe. Maybe $UID would work,
> > > since initdb isn't supposed to be setuid anyway.
> >
> > Again, a bash-ism. Let's face, it, the postgres binary is going to
> > croak on root anyway, so we are just doing an extra check in initdb.
>
> But the point was to initialize to superuser id in Postgres as that
> number, but we might as well start them out at 0, like it is now.

I am now using:

POSTGRES_SUPERUSERID="`id -u 2>/dev/null || echo 0`"

Let's see how portable that is?

--
Bruce Momjian | http://www.op.net/~candle
maillist(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Hiroshi Inoue 1999-12-20 02:24:51 RE: [HACKERS] NOTICE: LockRelease: locktable lookup failed, no lock
Previous Message Bruce Momjian 1999-12-20 02:17:00 Re: initdb.sh fixed