home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / unix / programm / 5203 < prev    next >
Encoding:
Text File  |  1992-11-08  |  1.8 KB  |  57 lines

  1. Xref: sparky comp.unix.programmer:5203 comp.sys.sun.misc:5143
  2. Newsgroups: comp.unix.programmer,comp.sys.sun.misc
  3. Path: sparky!uunet!zaphod.mps.ohio-state.edu!rpi!fitzgb
  4. From: fitzgb@mml0.meche.rpi.edu (Brian Fitzgerald)
  5. Subject: Re: setuid programs and calls...
  6. Message-ID: <p7k1+ga@rpi.edu>
  7. Followup-To: comp.unix.programmer
  8. Nntp-Posting-Host: mml0.meche.rpi.edu
  9. Organization: Rensselaer Polytechnic Institute, Troy, NY
  10. References: <1de9ihINN98v@early-bird.think.com>
  11. Date: Sat, 7 Nov 1992 15:15:11 GMT
  12. Lines: 43
  13.  
  14. Barry Margolin writes:
  15. >dynamic linker in setuid processes, which are defined to be processes whose
  16. >real and effective uids are not equal.  This is done to prevent users from
  17.  
  18. I have just a minor question, but how does a Sun executable program
  19. find out its effective uid?  Whenever I trace a program I see that it
  20. make makes a call to getuid but not geteuid.  I have always wondered
  21. about this.
  22.  
  23. Brian
  24.  
  25. fitzgb@mml0.meche //tmpfs (253) cat > a.c
  26. main(){;}
  27.  
  28. fitzgb@mml0.meche //tmpfs (254) cc a.c
  29.  
  30. fitzgb@mml0.meche //tmpfs (255) trace ./a.out
  31. open ("/usr/lib/ld.so", 0, 021044) = 3
  32. read (3, "".., 32) = 32
  33. mmap (0, 139264, 0x5, 0x80000002, 3, 0) = 0xdddc000
  34. mmap (0xddfc000, 8192, 0x7, 0x80000012, 3, 16384) = 0xddfc000
  35. munmap (0xdde0000, 114688) = 0
  36. open ("/dev/zero", 0, 021152) = 4
  37. getrlimit (3, 0xdfff97c) = 0
  38. mmap (0xde00000, 8192, 0x3, 0x80000012, 4, 0) = 0xde00000
  39. close (3) = 0
  40. getuid () = 15636
  41. getgid () = 4000
  42. open ("/etc/ld.so.cache", 0, 01570000130) = 3
  43. fstat (3, 0xdfff8f0) = 0
  44. mmap (0, 8192, 0x1, 0x80000001, 3, 0) = 0xddf8000
  45. close (3) = 0
  46. open ("/usr/lib/libc.so.0.15", 0, 01567347240) = 3
  47. read (3, "".., 32) = 32
  48. mmap (0, 409600, 0x5, 0x80000002, 3, 0) = 0xdd76000
  49. mmap (0xddd6000, 16384, 0x7, 0x80000012, 3, 385024) = 0xddd6000
  50. close (3) = 0
  51. close (4) = 0
  52. close (0) = 0
  53. close (1) = 0
  54. close (2) = 0
  55. exit (1) = ?
  56.  
  57.