Re: setuid(geteuid());?

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: setuid(geteuid());?
Date: 2001-04-21 19:57:49
Message-ID: 200104211957.f3LJvoG23357@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> > That is a valid concern, but the code doesn't actually prevent this.
>
> After reading the setuid man page a third time, I think you are right.
>
> On machines that have setreuid(), or even better setresuid(), we could
> force the ruid (and suid for good measure) to match euid. Otherwise we
> probably should refuse to start unless getuid matches geteuid.
>
> Hmm ... setresuid may be an HP-ism ... does anyone else have that?
> setreuid appears to be a BSD-ism, so it ought to be reasonably popular.

I have setreuid on BSD/OS, no setresuid.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(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 Bruce Momjian 2001-04-21 19:58:36 Re: setuid(geteuid());?
Previous Message Peter Eisentraut 2001-04-21 18:13:57 Re: setuid(geteuid());?