home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky alt.sys.sun:3598 comp.sys.sun.misc:6582
- Path: sparky!uunet!ukma!bogus.sura.net!opusc!tbone.biol.scarolina.edu!dean2
- From: dean2@tbone.biol.scarolina.edu (Dean Pentcheff)
- Newsgroups: alt.sys.sun,comp.sys.sun.misc
- Subject: Re: Can "normal" users mount under Solaris 2.X
- Followup-To: alt.sys.sun
- Date: 29 Jan 1993 02:43:40 GMT
- Organization: Department of Biology, University of South Carolina, Columbia
- Lines: 44
- Sender: Dean Pentcheff
- Message-ID: <1ka5ksINNdjb@bigbird.csd.scarolina.edu>
- References: <C15usz.L0t@intcorp.mn.org> <1993Jan27.155702.14041@cci632.cci.com>
- Reply-To: dean2@tbone.biol.scarolina.edu (Dean Pentcheff)
- NNTP-Posting-Host: tbone.biol.scarolina.edu
-
- In article <1993Jan27.155702.14041@cci632.cci.com> djh@cci632.cci.com (Daniel J. Hazekamp) writes:
- >
- >To get around the setuid shell script issue, I wrote two small C programs to
- >mount and unmount DOS format floppies. We do not allow mounting of Unix format
- >floppies here.
- >
- >The following code works under SunOS 4.1.x. You`ll have to try it under
- >Solaris 2.x yourself. Just compile it and make it SetUID root.
- >
- >Dan
- >djh@cci.com
- >--
- >Dan Hazekamp uupsi!cci632!djh
- >Computer Consoles Inc. (CCI) uunet!ccicpg!cci632!djh
- >Rochester, NY Internet: djh@cci.com
-
- ....[ code omitted for brevity]....
-
- >fdunmount.c
- >
- >main()
- >{
- > if (unmount("/pcfs") != 0)
- > perror("fdunmount");
- > else
- > system("eject /dev/rfd0");
- >}
-
-
- I think this may be a security risk (but I'm sure no Unix-security
- pro). It seems to me that a system() call within a suid-root program
- is a bad idea. What happens if someone convinces the invoked sh
- program to use a "special" path that leads to their own specially
- hacked version of "eject"? Is that a risk? Or is it safe?
-
- I'd appreciate confirmation or rejection of this idea from Folks Who
- Know.
-
- Thanks!
-
- -Dean
- --
- Dean Pentcheff (Internet: dean2@tbone.biol.scarolina.edu) (803) 777-8998
- Department of Biology, University of South Carolina, Columbia SC 29205
-