Re: ipcclean in 8.1 broken? - Mailing list pgsql-hackers

From Roman Neuhauser
Subject Re: ipcclean in 8.1 broken?
Date
Msg-id 20060301120411.GA96175@isis.sigpipe.cz
Whole thread Raw
In response to Re: ipcclean in 8.1 broken?  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
# peter_e@gmx.net / 2006-03-01 12:49:13 +0100:
> Am Dienstag, 28. Februar 2006 07:42 schrieb Christopher Kings-Lynne:
> > I just tried using ipcclean in 8.1.3.  It doesn't work when I su to the
> > pgsql user.  This part of the script:
> >
> > 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?
   use "su -l"? this is on FreeBSD 6:
    By default, the environment is unmodified with the exception of USER,    HOME, and SHELL.    ...    -l
Simulatea full login.  The environment is discarded except for            HOME, SHELL, PATH, TERM, and USER.  HOME and
SHELLare modified            as above.  USER is set to the target login.  PATH is set to            ``/bin:/usr/bin''.
TERMis imported from your current environ-            ment.
 
   smradoch@neuhauser ~ 1001:0 > echo $USER $LOGNAME   smradoch smradoch   smradoch@neuhauser ~ 1002:0 > su -l
Password:  neuhauser# echo $USER $LOGNAME   root root   neuhauser# logout   smradoch@neuhauser ~ 1003:0 > su
Password:  You have mail.   neuhauser# echo $USER $LOGNAME   smradoch smradoch   neuhauser# exit   smradoch@neuhauser ~
1004:0> uname -srm   FreeBSD 6.1-PRERELEASE amd64
 
   su (coreutils) 4.5.3 on RHEL3 behaves exactly the same.

-- 
How many Vietnam vets does it take to screw in a light bulb?
You don't know, man.  You don't KNOW.
Cause you weren't THERE.             http://bash.org/?255991


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: ipcclean in 8.1 broken?
Next
From: "Andrew Dunstan"
Date:
Subject: Re: Initdb on Windows 2003