git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alex Riesen <raa.lkml@gmail.com>
To: git@vger.kernel.org
Cc: Junio C Hamano <junkio@cox.net>
Subject: [PATCH] Fix git init --shared=all on FreeBSD 4.11
Date: Tue, 4 Mar 2008 00:44:06 +0100	[thread overview]
Message-ID: <20080303234406.GA28158@steel.home> (raw)

At least FreeBSD 4.11p2 does not allow changing SUID/GUID bits to
a non-root user.

Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
---

I seem to get really weird systems lately...

 path.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/path.c b/path.c
index af27161..4865e98 100644
--- a/path.c
+++ b/path.c
@@ -265,6 +265,7 @@ int adjust_shared_perm(const char *path)
 		return 0;
 	if (lstat(path, &st) < 0)
 		return -1;
+	st.st_mode &= 07777 & ~(S_ISUID|S_ISGID);
 	mode = st.st_mode;
 	if (mode & S_IRUSR)
 		mode |= (shared_repository == PERM_GROUP
-- 
1.5.4.3.469.gf84e2


             reply	other threads:[~2008-03-03 23:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-03 23:44 Alex Riesen [this message]
2008-03-04  0:31 ` [PATCH] Fix git init --shared=all on FreeBSD 4.11 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
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=20080303234406.GA28158@steel.home \
    --to=raa.lkml@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).