home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / unix / admin / 6821 < prev    next >
Encoding:
Text File  |  1992-12-29  |  1.4 KB  |  43 lines

  1. Newsgroups: comp.unix.admin
  2. Path: sparky!uunet!gatech!destroyer!news.iastate.edu!john
  3. From: john@iastate.edu (John Hascall)
  4. Subject: Re: How to write a "turnin" utility??
  5. Message-ID: <C010F5.9D6@news.iastate.edu>
  6. Sender: news@news.iastate.edu (USENET News System)
  7. Organization: Iowa State University, Ames IA
  8. References: <1992Dec28.213900.14908@organpipe.uug.arizona.edu> <1992Dec29.015418.12223@doug.cae.wisc.edu>
  9. Date: Tue, 29 Dec 1992 15:01:53 GMT
  10. Lines: 31
  11.  
  12. chris@castlab.uucp (Christian) writes:
  13. }dave@bigdog.engr.arizona.edu (Dave Pottinger) writes:
  14. }>I'm relatively new to Unix sys admin stuff and have run into some
  15. }>problems with what should be a simple little "turnin" project.
  16.  
  17. }how about:  [SetUID script]
  18.  
  19. }# /bin/csh
  20. }cp %1 /usr/home/instructors/directory/
  21.  
  22. That's the basic idea, but it needs some work....
  23. Consider:
  24.  
  25.    What if two students both call their program "proj1" (or whatever)?
  26.    Boom, one of them gets clobbered.
  27.  
  28. A further refinement:
  29.  
  30. #!/bin/sh
  31. /bin/cp $1 /home/instructor/turnin/$USER.$1
  32.  
  33. others are no doubt possible.  Actually, given the known horrors of setuid
  34. scripts it should really be a program (or god forbid, Perl, the APL of scripts)
  35. to be safe.
  36.  
  37. John
  38. -- 
  39. John Hascall                   ``An ill-chosen word is the fool's messenger.''
  40. Systems Software Engineer
  41. Project Vincent
  42. Iowa State University Computation Center  +  Ames, IA  50011  +  515/294-9551
  43.