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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

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

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

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux