Re: [HACKERS] ipcclean in 8.1 broken?

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Cc: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, Peter Eisentraut <peter_e(at)gmx(dot)net>
Subject: Re: [HACKERS] ipcclean in 8.1 broken?
Date: 2006-03-03 21:52:48
Message-ID: 200603032152.k23LqmP06399@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

pgman wrote:
> Christopher Kings-Lynne wrote:
> > >> if [ "$USER" = 'root' -o "$LOGNAME" = 'root' ]
> > >>
> > >> Always fails because even tho $USER is set to 'pgsql' when su'ed,
> > >> $LOGNAME is still root.
> > >>
> > >> This is on FreeBSD 4.9
> > >
> > > It seems to work on Linux; apparently there are different behaviors of su. Do
> > > you have a suggestion for resolving this?
> >
> > Well all I did to fix it on FreeBSD was to remove the '-o "$LOGNAME" =
> > 'root'' bit...
>
> I applied the attached patch to CVS HEAD and 8.1.X. It looks at LOGNAME
> only if USER is not set.

OK, updated patch that tries to use 'id' first. Applied. Backpatch to 8.1.X.

--
Bruce Momjian http://candle.pha.pa.us
SRA OSS, Inc. http://www.sraoss.com

+ If your life is a hard drive, Christ can be your backup. +

Attachment Content-Type Size
unknown_filename text/plain 955 bytes

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2006-03-03 22:02:00 Re: [PATCHES] [HACKERS] Online backup vs Continuous backup
Previous Message Bruce Momjian 2006-03-03 20:40:38 Re: drop if exists remainder