home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / unix / question / 10122 < prev    next >
Encoding:
Text File  |  1992-08-17  |  1.0 KB  |  29 lines

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