home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / gnu / bash / bug / 504 < prev    next >
Encoding:
Text File  |  1992-07-27  |  1.4 KB  |  40 lines

  1. Newsgroups: gnu.bash.bug
  2. Path: sparky!uunet!europa.asd.contel.com!darwin.sura.net!wupost!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!odin.ins.cwru.edu!chet
  3. From: chet@odin.ins.cwru.edu (Chet Ramey)
  4. Subject: Re: builtin test -w unaware of group permissions
  5. Message-ID: <9207271317.AA09506.SM@odin.INS.CWRU.Edu>
  6. Sender: gnulists@ai.mit.edu
  7. Reply-To: chet@po.cwru.edu
  8. Organization: GNUs Not Usenet
  9. References: chet@odin.ins.cwru.edu (Chet Ramey)
  10. Distribution: gnu
  11. Date: Mon, 27 Jul 1992 05:17:38 GMT
  12. Approved: bug-bash@prep.ai.mit.edu
  13. Lines: 25
  14.  
  15. > It seems Bash's builtin "test" command didn't know that I could write
  16. > a file based on group permissions, whereas all the other "test"
  17. > commands I could find worked OK.
  18.  
  19. This is a problem with SunOS for which bash 1.12 does not have a correct
  20. workaround.  SunOS 4.1.x is (nominally) a Posix system, so bash uses the
  21. Posix.1 types uid_t and gid_t.  Groups in SunOS when using the (default)
  22. BSD includes and libraries are int everywhere but in the stat structure,
  23. where they are gid_t.
  24.  
  25. The Sun getgroups(2) actually takes and returns an array of int rather than
  26. gid_t, but bash was following Posix.1 and calling with an array of gid_t. 
  27. Since gid_t is unsigned short, the values returned in the array were
  28. garbage. 
  29.  
  30. Bash 1.13 should do this correctly.
  31.  
  32. Chet
  33.  
  34. --
  35. ``The use of history as therapy means the corruption of history as history.''
  36.     -- Arthur Schlesinger
  37.  
  38. Chet Ramey, Case Western Reserve University    Internet: chet@po.CWRU.Edu
  39.  
  40.