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

[PATCH] Fix git init --shared=all on FreeBSD 4.11

From
Alex Riesen <raa.lkml@gmail.com>
Date
Mar 3, 2008, 23:44 UTC
Message-ID
<20080303234406.GA28158@steel.home>

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
Next: Junio C Hamano
Message 1 of 10 in “Fix git init --shared=all on FreeBSD 4.11”
  1. Fix git init --shared=all on FreeBSD 4.11Alex Riesen, Mar 3, 2008
  2. Junio C HamanoMar 4, 2008
  3. Alex RiesenMar 4, 2008
  4. Junio C HamanoMar 4, 2008
  5. Do not use GUID on dir in git init --shared=all on FreeBSD 4.11p2Alex Riesen, Mar 4, 2008
  6. Junio C HamanoMar 4, 2008
  7. Alex RiesenMar 4, 2008
  8. Do not use GUID on dir in git init --shared=all on FreeBSDAlex Riesen, Mar 4, 2008
  9. Johannes SchindelinMar 4, 2008
  10. Alex RiesenMar 4, 2008

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.