Article View: gnu.bash.bug
Article #229Re: builtin test -w unaware of group permissions
From: Chet Ramey
Date: Mon, 27 Jul 1992 05:17
Date: Mon, 27 Jul 1992 05:17
24 lines
1521 bytes
1521 bytes
> It seems Bash's builtin "test" command didn't know that I could write > a file based on group permissions, whereas all the other "test" > commands I could find worked OK. This is a problem with SunOS for which bash 1.12 does not have a correct workaround. SunOS 4.1.x is (nominally) a Posix system, so bash uses the Posix.1 types uid_t and gid_t. Groups in SunOS when using the (default) BSD includes and libraries are int everywhere but in the stat structure, where they are gid_t. The Sun getgroups(2) actually takes and returns an array of int rather than gid_t, but bash was following Posix.1 and calling with an array of gid_t. Since gid_t is unsigned short, the values returned in the array were garbage. Bash 1.13 should do this correctly. Chet -- ``The use of history as therapy means the corruption of history as history.'' -- Arthur Schlesinger Chet Ramey, Case Western Reserve University Internet: chet@po.CWRU.Edu
Technical Details
Message-ID:
<9207271317.AA09506.SM@odin.INS.CWRU.Edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!europa.asd.contel.com!darwin.sura.net!wupost!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!odin.ins.cwru.edu!chetReferences:
chet@odin.ins.cwru.edu (Chet Ramey)Show Full Headers
Complete Article Headers
Newsgroups: gnu.bash.bug Path: arc1-ca.pugleaf.net!sparky!uunet!europa.asd.contel.com!darwin.sura.net!wupost!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!odin.ins.cwru.edu!chet From: chet@odin.ins.cwru.edu (Chet Ramey) Subject: Re: builtin test -w unaware of group permissions Message-ID: <9207271317.AA09506.SM@odin.INS.CWRU.Edu> Sender: gnulists@ai.mit.edu Reply-To: chet@po.cwru.edu Organization: GNUs Not Usenet References: chet@odin.ins.cwru.edu (Chet Ramey) Distribution: gnu Date: Mon, 27 Jul 1992 05:17:38 GMT Approved: bug-bash@prep.ai.mit.edu Lines: 25