home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / os / linux / 9965 < prev    next >
Encoding:
Text File  |  1992-09-08  |  1.7 KB  |  40 lines

  1. Newsgroups: comp.os.linux
  2. Path: sparky!uunet!munnari.oz.au!metro!socs.uts.edu.au!syzygy!pdhatchm
  3. From: pdhatchm@socs.uts.edu.au (Paul Hatchman)
  4. Subject: Re: clearing SUID bit on writes
  5. Message-ID: <pdhatchm.715665475@syzygy>
  6. Sender: news@socs.uts.edu.au
  7. Organization: Computing Sciences, Uni of Technology, Sydney.
  8. References: <1992Sep1.170221.17317@athena.mit.edu>
  9. Date:  5 Sep 92 03:57:55 GMT
  10. Lines: 28
  11.  
  12. tytso@ATHENA.MIT.EDU (Theodore Ts'o) writes:
  13.  
  14. >When System V does is whenever you write to a setuid file (not just when
  15. >you append to it), it clears the setuid and setgid bits.  This prevents
  16. >a security hole if you have a setuid program which is group or world
  17. >writeable.  I don't think anything would break if we added this behavior
  18. >to Linux.  On the other hand, there's a much simpler way of avoiding the
  19. >security hole, which is to simply don't create group or world writeable
  20. >setuid files.
  21.  
  22. I do not believe that this is the case. SunOs and the other sys V unixes I 
  23. have used only clear the setuid / setgid bits when the file is written to by
  24. a user / group that does not *own* the file.
  25.  
  26. eg if i have a file that is world writable, I own it and it is setuid.
  27. I can write to that fiel as much as I want and the permissions stay the same.
  28.  
  29. Now as soon as someone else writes to the file, the setuid bit is cleared.
  30.  
  31. I believe that this is the correct behaviour for setuid / setgid files and also
  32. a rather sensible way to go about things.
  33.  
  34.  
  35. --
  36. --------------------------------------------------------------------------------
  37. Paul Hatchman                      |    <this line intentionally left blank>
  38. Systems Programmer,                |    pdhatchm@socs.uts.edu.au (prefered)    
  39. Sydney Futures Exchange, Australia |       paulh@uts.edu.au 
  40.