home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / alt / sys / sun / 3598 < prev    next >
Encoding:
Internet Message Format  |  1993-01-28  |  2.0 KB

  1. Xref: sparky alt.sys.sun:3598 comp.sys.sun.misc:6582
  2. Path: sparky!uunet!ukma!bogus.sura.net!opusc!tbone.biol.scarolina.edu!dean2
  3. From: dean2@tbone.biol.scarolina.edu (Dean Pentcheff)
  4. Newsgroups: alt.sys.sun,comp.sys.sun.misc
  5. Subject: Re: Can "normal" users mount under Solaris 2.X
  6. Followup-To: alt.sys.sun
  7. Date: 29 Jan 1993 02:43:40 GMT
  8. Organization: Department of Biology, University of South Carolina, Columbia
  9. Lines: 44
  10. Sender: Dean Pentcheff
  11. Message-ID: <1ka5ksINNdjb@bigbird.csd.scarolina.edu>
  12. References: <C15usz.L0t@intcorp.mn.org> <1993Jan27.155702.14041@cci632.cci.com>
  13. Reply-To: dean2@tbone.biol.scarolina.edu (Dean Pentcheff)
  14. NNTP-Posting-Host: tbone.biol.scarolina.edu
  15.  
  16. In article <1993Jan27.155702.14041@cci632.cci.com> djh@cci632.cci.com (Daniel J. Hazekamp) writes:
  17. >
  18. >To get around the setuid shell script issue, I wrote two small C programs to
  19. >mount and unmount DOS format floppies. We do not allow mounting of Unix format
  20. >floppies here. 
  21. >
  22. >The following code works under SunOS 4.1.x. You`ll have to try it under
  23. >Solaris 2.x yourself. Just compile it and make it SetUID root.
  24. >
  25. >Dan
  26. >djh@cci.com
  27. >-- 
  28. >Dan Hazekamp                    uupsi!cci632!djh
  29. >Computer Consoles Inc. (CCI)            uunet!ccicpg!cci632!djh
  30. >Rochester, NY                    Internet: djh@cci.com
  31.  
  32. ....[ code omitted for brevity]....
  33.  
  34. >fdunmount.c
  35. >
  36. >main()
  37. >{
  38. >        if (unmount("/pcfs") != 0)
  39. >                perror("fdunmount");
  40. >        else
  41. >                system("eject /dev/rfd0");
  42. >}
  43.  
  44.  
  45. I think this may be a security risk (but I'm sure no Unix-security
  46. pro).  It seems to me that a system() call within a suid-root program
  47. is a bad idea.  What happens if someone convinces the invoked sh
  48. program to use a "special" path that leads to their own specially
  49. hacked version of "eject"?  Is that a risk?  Or is it safe?
  50.  
  51. I'd appreciate confirmation or rejection of this idea from Folks Who
  52. Know.
  53.  
  54. Thanks!
  55.  
  56. -Dean
  57. -- 
  58. Dean Pentcheff (Internet: dean2@tbone.biol.scarolina.edu) (803) 777-8998
  59. Department of Biology, University of South Carolina, Columbia SC 29205
  60.