Re: ipcclean in 8.1 broken?
Mark Kirkwood <markir@paradise.net.nz>
From: Mark Kirkwood <markir@paradise.net.nz>
To: Christopher Kings-Lynne <chriskl@familyhealth.com.au>
Cc: "Brusser, Michael" <Michael.Brusser@matrixone.com>, Peter Eisentraut <peter_e@gmx.net>, pgsql-hackers@postgresql.org
Date: 2006-03-02T01:58:42Z
Lists: pgsql-hackers
Christopher Kings-Lynne wrote:
>> I wonder if there could be a potential problem with using this approach
>> -
>> checking on $USER == root.
>>
>> Although it is a common practice, I think a superuser does not have to
>> be root.
>
>
> Yes, like the 'toor' account in FreeBSD... (disabled by default though)
>
Might be better to check if uid == 0, however there are some traps here
too as the most convenient methd ('id -u') is not support everywhere
(e.g Solaris 8). I think I used awk or sed on the plain old 'id' output
last time something like this came up.
Cheers
Mark