[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: /bin/ids is setuid root, why ?
From: |
Marcus Brinkmann |
Subject: |
Re: /bin/ids is setuid root, why ? |
Date: |
Mon, 4 Nov 2002 01:49:21 +0100 |
User-agent: |
Mutt/1.4i |
On Sun, Nov 03, 2002 at 03:50:52PM +0100, Gaël Le Mignot wrote:
> Hello,
> Does someone know why /bin/ids has the setuid-bit set ?
> Since it works well without the bit too, why keep it ?
This is so that the ids program really really gets the authentication port
of its parent, instead of its own dup. See the comment in ids.c:
if (pid < 0)
/* We get our parent's authentication instead of our own because this
program is usually installed setuid. This should work even if it's
not installed setuid, using the auth port as authentication to the
msg_get_init_port rpc. */
pid = getppid ();
The same comment seems to indicate that this is not really necessary. I
wonder, too. Can anybody clear this up?
There is also /bin/login, which doesn't need to be setuid if you have the
password server set up and working (but you will be out of luck if it
isn't).
Thanks,
Marcus
--
`Rhubarb is no Egyptian god.' GNU http://www.gnu.org marcus@gnu.org
Marcus Brinkmann The Hurd http://www.gnu.org/software/hurd/
Marcus.Brinkmann@ruhr-uni-bochum.de
http://www.marcus-brinkmann.de/