DORMANTno replies

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

From: Alex Riesen <hidden>
Date: 2016-06-15 22:44:20
Subsystem: the rest · Maintainer: Linus Torvalds

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

Signed-off-by: Alex Riesen <redacted>
---

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help