home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!auspex-gw!guy
- From: guy@Auspex.COM (Guy Harris)
- Newsgroups: comp.unix.programmer
- Subject: Re: setuid programs and calls...
- Message-ID: <15390@auspex-gw.auspex.com>
- Date: 7 Nov 92 20:25:15 GMT
- References: <1de9ihINN98v@early-bird.think.com> <p7k1+ga@rpi.edu>
- Sender: news@auspex-gw.auspex.com
- Organization: Auspex Systems, Santa Clara
- Lines: 13
- Nntp-Posting-Host: bootme.auspex.com
-
- >I have just a minor question, but how does a Sun executable program
- >find out its effective uid? Whenever I trace a program I see that it
- >make makes a call to getuid but not geteuid. I have always wondered
- >about this.
-
- Do not confuse traps into the kernel with procedure calls.
-
- Both the "getuid()" and "geteuid()" calls make the exact same trap into
- the kernel; the real and effective UIDs are returned in two different
- registers. The "getuid()" routine returns the value in one of those
- registers; the "geteuid()" routine returns the value in the other.
-
- "trace" traces traps into the kernel, not procedure calls.
-