git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: bsd group semantics

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 31, 2009, 21:33 UTC
Message-ID
<7vr60d4btl.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<20090331203600.GA24340@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 41 quoted lines
> On Tue, Mar 31, 2009 at 01:26:01PM -0700, Junio C Hamano wrote:
>
>> For now, I'd suggest teaching the test not to care about g+s bit.
>> After all, they are about giving correct mode bits to files and
>> directories.  Correct mode bits for group do not mean anything if you make
>> them owned by a wrong group, but that is not something we have tested so
>> far, and can be a separate test anyway.
>
> Makes sense. How about this?
>
> -- >8 --
> Subject: [PATCH] t1301: loosen test for forced modes
>
> One of the aspects of the test checked explicitly for the
> g+s bit to be set on created directories. However, this is
> only the means to an end (the "end" being having the correct
> group set). And in fact, on systems where
> DIR_HAS_BSD_GROUP_SEMANTICS is set, we do not even need to
> use this "means" at all, causing the test to fail.
>
> This patch removes that part of the test. In an ideal world
> it would be replaced by a test to check that the group was
> properly assigned, but that is difficult to automate because
> it requires the user running the test suite be a member of
> multiple groups.
>
> Signed-off-by: Jeff King <peff@peff.net>
> ---
>  t/t1301-shared-repo.sh |    3 ---
>  1 files changed, 0 insertions(+), 3 deletions(-)
>
> diff --git a/t/t1301-shared-repo.sh b/t/t1301-shared-repo.sh
> index 11ef302..9b18507 100755
> --- a/t/t1301-shared-repo.sh
> +++ b/t/t1301-shared-repo.sh
> @@ -147,9 +147,6 @@ test_expect_success 'forced modes' '
>  	# Everything must be unaccessible to others
>  	test -z "$(sed -n -e "/^.......---/d" actual)" &&
>  
> -	# All directories must have 2770
> -	test -z "$(sed -n -e "/^drwxrws---/d" -e "/^d/p" actual)" &&
Did you mean 

- # All directories must have 2770 - test -z "$(sed -n -e "/^drwxrws---/d" -e "/^d/p" actual)" && + # All directories must have either 2770 or 770 + test -z "$(sed -n -e "/^drwxrw[sx]---/d" -e "/^d/p" actual)" &&

Show 6 quoted lines
> -
>  	# post-update hook must be 0770
>  	test -z "$(sed -n -e "/post-update/{
>  		/^-rwxrwx---/d
> -- 
> 1.6.2.1.591.geb450
Previous: Jeff KingNext: Jeff King
Message 8 of 9 in “bsd group semantics”
  1. Jeff KingMar 31, 2009
  2. Junio C HamanoMar 31, 2009
  3. Jeff KingMar 31, 2009
  4. Junio C HamanoMar 31, 2009
  5. Jeff KingMar 31, 2009
  6. Junio C HamanoMar 31, 2009
  7. Jeff KingMar 31, 2009
  8. Junio C HamanoMar 31, 2009
  9. Jeff KingMar 31, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.