git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Fix git init --shared=all on FreeBSD 4.11
@ 2008-03-03 23:44 Alex Riesen
  2008-03-04  0:31 ` Junio C Hamano
  0 siblings, 1 reply; 10+ messages in thread
From: Alex Riesen @ 2008-03-03 23:44 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano

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


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2008-03-04 23:48 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

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).