Re: ipcclean in 8.1 broken?

Bruce Momjian <pgman@candle.pha.pa.us>

From: Bruce Momjian <pgman@candle.pha.pa.us>
To: Christopher Kings-Lynne <chriskl@familyhealth.com.au>
Cc: Peter Eisentraut <peter_e@gmx.net>, pgsql-hackers@postgresql.org
Date: 2006-03-03T16:54:58Z
Lists: pgsql-hackers

Attachments

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.

-- 
  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. +