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