home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / std_unix / volume.22 / text0136.txt < prev    next >
Encoding:
Text File  |  1991-03-06  |  1.0 KB  |  30 lines

  1. Submitted-by: karish@mindcraft.com (Chuck Karish)
  2.  
  3. In article <18296@cs.utexas.edu> alex@am.sublink.org (Alex Martelli) writes:
  4. >So, what DOES Posix say about this (open(), write(),
  5. >cat, shell redirection, and permission bits), and what SHOULD it say?
  6.  
  7. POSIX.1 clause 5.6.1.2, descriptions of S_ISUID and S_ISGID bits:  "On
  8. a regular file, this bit should be cleared on any write."
  9.  
  10. Note the word "should".  This is a recommendation to implementors, not
  11. a requirement.
  12.  
  13. BSD 4.3 write(2) man page: "If the real user is not the super-user,
  14. then write() clears the set-user-id bit on a file."
  15.  
  16. Interactive man pages for stat(2), write(2), and chmod(2) are silent on
  17. this issue.
  18.  
  19. POSIX.2 is pretty much constrained to accept as valid behavior that's
  20. allowed/suggested by POSIX.1.  I don't think there are any requirements
  21. that the utilities second-guess and defeat the file access policies
  22. that could legitimately be imposed by an underlying POSIX.1 operating
  23. system.
  24.  
  25.     Chuck Karish        karish@mindcraft.com
  26.     Mindcraft, Inc.        (415) 323-9000
  27.  
  28. Volume-Number: Volume 22, Number 140
  29.  
  30.