Subject: Re: /sbin/route should use geteuid()
To: None <carrel@cisco.com>
From: None <Mark_Weaver@brown.edu>
List: netbsd-bugs
Date: 08/03/1994 04:57:58
carrel@cisco.com writes:
> NetBSD's route(1) uses getuid() to decide if the the correct user
> is running it. But it would be better to use geteuid() since route can be
> run from a setuid program and that is valid.
route is a setuid root program, so euid will always be 0. If you
need to call it from a setuid program, you'll have to set the ruid
to 0 before running it.
Mark
--------------------------------------------------------------------
Email: Mark_Weaver@brown.edu | Brown University
PGP Key: finger mhw@cs.brown.edu | Dept of Computer Science
------------------------------------------------------------------------------