From: Junio C Hamano <gitster@pobox.com>
To: Alex Riesen <raa.lkml@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Do not use GUID on dir in git init --shared=all on FreeBSD 4.11p2
Date: Tue, 04 Mar 2008 12:44:29 -0800 [thread overview]
Message-ID: <7vr6eq43te.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <20080304202047.GC3295@steel.home> (Alex Riesen's message of "Tue, 4 Mar 2008 21:20:47 +0100")
Alex Riesen <raa.lkml@gmail.com> writes:
> It does not allow changing the bit to a non-root user.
> This fixes t1301-shared-repo.sh on the platform.
...
> diff --git a/path.c b/path.c
> index af27161..6f09ba2 100644
> --- a/path.c
> +++ b/path.c
> @@ -282,8 +282,10 @@ int adjust_shared_perm(const char *path)
> : (shared_repository == PERM_EVERYBODY
> ? (S_IXGRP|S_IXOTH)
> : 0));
> +#if !defined(__FreeBSD__) || (__FreeBSD__ > 4)
> if (S_ISDIR(mode))
> mode |= S_ISGID;
> +#endif
As usual, please do something like
(1) In git-compat-util.h
#ifndef MKDIR_HAS_BSD_GROUP_SEMANTICS
#define FORCE_BSD_GROUP_SEMANTICS S_ISGID
#else
#define FORCE_BSD_GROUP_SEMANTICS 0
#endif
(2) In Makefile (and configure.in perhaps)
ifeq ($(uname_S),FreeBSD)
MKDIR_HAS_BSD_GROUP_SEMANTICS = YesPlease
endif
...
ifdef MKDIR_HAS_BSD_GROUP_SEMANTICS
COMPAT_CFLAGS += -DMKDIR_HAS_BSD_GROUP_SEMANTICS
endif
(3) In the above codepath:
if (S_ISDIR(mode))
mode |= FORCE_BSD_GROUP_SEMANTICS;
or something. Avoid #if directly based on platform names in *.c files.
next prev parent reply other threads:[~2008-03-04 20:45 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-03 23:44 [PATCH] Fix git init --shared=all on FreeBSD 4.11 Alex Riesen
2008-03-04 0:31 ` Junio C Hamano
2008-03-04 7:25 ` Alex Riesen
2008-03-04 8:08 ` Junio C Hamano
2008-03-04 20:20 ` [PATCH] Do not use GUID on dir in git init --shared=all on FreeBSD 4.11p2 Alex Riesen
2008-03-04 20:44 ` Junio C Hamano [this message]
2008-03-04 21:46 ` Alex Riesen
2008-03-04 23:15 ` [PATCH] Do not use GUID on dir in git init --shared=all on FreeBSD Alex Riesen
2008-03-04 20:50 ` [PATCH] Do not use GUID on dir in git init --shared=all on FreeBSD 4.11p2 Johannes Schindelin
2008-03-04 21:46 ` Alex Riesen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7vr6eq43te.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=raa.lkml@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.