home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!europa.asd.contel.com!emory!athena.cs.uga.edu!weinri
- From: weinri@athena.cs.uga.edu (Kevin Weinrich)
- Newsgroups: comp.unix.questions
- Subject: SUMMARY: How does one write a suid *wrapper* in C to, e.g., mount a CD-ROM drive
- Message-ID: <1992Aug17.144639.3081@athena.cs.uga.edu>
- Date: 17 Aug 92 14:46:39 GMT
- Organization: University of Georgia, Athens
- Lines: 19
-
- Got a number of good, though varying, replies (kudos to responers
- follows). Here's what I'm now using, which seems to work:
- ---------------------------------------------
- main() {
- chdir("/usr/etc");
- execl("/usr/etc/mount","mount","-rt","nfs","helios:/cdrom",
- "/cdrom", (char *) 0);
- }
- ---------------------------------------------
- If anyone needs the texts of the original respoders, send me e-mail.
-
- Many thanks to:
- Robert Earl: rearl@piggy.ucsb.edu
- Steven M. Rosen: df2tg2n@shoes.bell-atl.com
- Andrew Arensburger: arensb@kong.gsfc.nasa.gov
- Daniel B. Suthers: pbhya!dbsuthe@PacBell.COM
-
- Thanks again,
- Kevin Weinrich weinri@athena.cs.uga.edu
-