home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / unix / question / 9422 < prev    next >
Encoding:
Internet Message Format  |  1992-07-25  |  2.0 KB

  1. Xref: sparky comp.unix.questions:9422 comp.unix.programmer:3911 comp.unix.wizards:3307
  2. Newsgroups: comp.unix.questions,comp.unix.programmer,comp.unix.wizards
  3. Path: sparky!uunet!zaphod.mps.ohio-state.edu!mips!darwin.sura.net!convex!convex!tchrist
  4. From: Tom Christiansen <tchrist@convex.COM>
  5. Subject: Re: Making ``.plan'' EXECUTE a Program ???
  6. Message-ID: <1992Jul25.133747.13774@news.eng.convex.com>
  7. Originator: tchrist@pixel.convex.com
  8. Sender: usenet@news.eng.convex.com (news access account)
  9. Nntp-Posting-Host: pixel.convex.com
  10. Reply-To: tchrist@convex.COM (Tom Christiansen)
  11. Organization: CONVEX Realtime Development, Colorado Springs, CO
  12. References: <1992Jul24.131605.8213@news.eng.convex.com> <1992Jul24.182737.22945@aston.ac.uk>
  13. Date: Sat, 25 Jul 1992 13:37:47 GMT
  14. X-Disclaimer: This message was written by a user at CONVEX Computer
  15.               Corp. The opinions expressed are those of the user and
  16.               not necessarily those of CONVEX.
  17. Lines: 29
  18.  
  19. From the keyboard of evansmp@uhura.aston.ac.uk (Mark Evans):
  20. :No this is braindead.
  21. :Why?
  22. :this means that user id -2 must have read access to the file.
  23. :this means that the users dir must be searchable by anyone.
  24.  
  25. yeah, so?  sure is a lot cleaner than making a special command
  26. to read protected files (like .plans) -- safer, too.  
  27.  
  28. :The point is that fingerd (running as root) should be able to read
  29. :.plan, it should however check that it is not a link to a file
  30. :the user shouldn't be reading.
  31.  
  32. witness the stack of contortions you're going through for protection.
  33. just let unix do this for you with open perms.
  34.  
  35. :Also fork is an expensive operation, a stat(2) call is much simpler.
  36.  
  37. you're a server, so you're forking anyway.
  38.  
  39. and unless you open the file first and fstat the descriptor, somebody
  40. can play games with you when you're not looking.
  41.  
  42. --tom
  43. -- 
  44.     Tom Christiansen      tchrist@convex.com      convex!tchrist
  45. I wish there was a knob on the TV to turn up the intelligence.  There's
  46. a knob called "brightness", but it doesn't work.
  47.                 -- Gallagher
  48.