home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / unix / shell / 5238 < prev    next >
Encoding:
Text File  |  1993-01-04  |  1.5 KB  |  43 lines

  1. Path: sparky!uunet!gatech!rpi!crdgw1!rdsunx.crd.ge.com!ariel!davidsen
  2. From: davidsen@ariel.crd.GE.COM (william E Davidsen)
  3. Newsgroups: comp.unix.shell
  4. Subject: Re: How to make Restrict Shell more safely?
  5. Message-ID: <1993Jan4.200035.7840@crd.ge.com>
  6. Date: 4 Jan 93 20:00:35 GMT
  7. References: <cslee.225.726145569@pds.nchu.edu.tw> <1993Jan4.194925.7364@crd.ge.com>
  8. Sender: usenet@crd.ge.com (Required for NNTP)
  9. Reply-To: davidsen@crd.ge.com (bill davidsen)
  10. Organization: GE Corporate R&D Center, Schenectady NY
  11. Lines: 29
  12. Nntp-Posting-Host: ariel.crd.ge.com
  13.  
  14. In article <1993Jan4.194925.7364@crd.ge.com>, davidsen@ariel.crd.GE.COM (william E Davidsen) writes:
  15.  
  16. | Okay, here's how... I'll show it for putting all the users in /guest,
  17. | since that's how I do it.
  18. |   1. Create the directory /guest/bin, and put all the stuff you want in
  19. | there, as wellas your shell.
  20.  
  21. Sorry to followup my own posting, but I forgot to mention that you put a
  22. dummy sh program in the /guest/bin directory, which calls rsh (or sh
  23. with the -r arg).
  24.  
  25. Something like:
  26.   main(argc,argv)
  27.   {
  28.     argv[0] = "rsh";
  29.     execvp("rsh", argv);
  30.   }
  31.  
  32. Since PATH only allows running programs from /guest/bin and the user
  33. can't write there, ill behaved user programs can't be executed (nor
  34. should you allow access to a compiler).
  35.  
  36. Followups please note any major holes in this (I've run it for years, so
  37. I probably have a fix I didn't mention).
  38.  
  39. -- 
  40. bill davidsen, GE Corp. R&D Center; Box 8; Schenectady NY 12345
  41.     Keyboard controller has been disabled, press F1 to continue.
  42.