home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.unix.programmer:5203 comp.sys.sun.misc:5143
- Newsgroups: comp.unix.programmer,comp.sys.sun.misc
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!rpi!fitzgb
- From: fitzgb@mml0.meche.rpi.edu (Brian Fitzgerald)
- Subject: Re: setuid programs and calls...
- Message-ID: <p7k1+ga@rpi.edu>
- Followup-To: comp.unix.programmer
- Nntp-Posting-Host: mml0.meche.rpi.edu
- Organization: Rensselaer Polytechnic Institute, Troy, NY
- References: <1de9ihINN98v@early-bird.think.com>
- Date: Sat, 7 Nov 1992 15:15:11 GMT
- Lines: 43
-
- Barry Margolin writes:
- >dynamic linker in setuid processes, which are defined to be processes whose
- >real and effective uids are not equal. This is done to prevent users from
-
- 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.
-
- Brian
-
- fitzgb@mml0.meche //tmpfs (253) cat > a.c
- main(){;}
-
- fitzgb@mml0.meche //tmpfs (254) cc a.c
-
- fitzgb@mml0.meche //tmpfs (255) trace ./a.out
- open ("/usr/lib/ld.so", 0, 021044) = 3
- read (3, "".., 32) = 32
- mmap (0, 139264, 0x5, 0x80000002, 3, 0) = 0xdddc000
- mmap (0xddfc000, 8192, 0x7, 0x80000012, 3, 16384) = 0xddfc000
- munmap (0xdde0000, 114688) = 0
- open ("/dev/zero", 0, 021152) = 4
- getrlimit (3, 0xdfff97c) = 0
- mmap (0xde00000, 8192, 0x3, 0x80000012, 4, 0) = 0xde00000
- close (3) = 0
- getuid () = 15636
- getgid () = 4000
- open ("/etc/ld.so.cache", 0, 01570000130) = 3
- fstat (3, 0xdfff8f0) = 0
- mmap (0, 8192, 0x1, 0x80000001, 3, 0) = 0xddf8000
- close (3) = 0
- open ("/usr/lib/libc.so.0.15", 0, 01567347240) = 3
- read (3, "".., 32) = 32
- mmap (0, 409600, 0x5, 0x80000002, 3, 0) = 0xdd76000
- mmap (0xddd6000, 16384, 0x7, 0x80000012, 3, 385024) = 0xddd6000
- close (3) = 0
- close (4) = 0
- close (0) = 0
- close (1) = 0
- close (2) = 0
- exit (1) = ?
-
-