From: Alex Riesen Date: Mon, 03 Mar 2008 23:44:06 GMT Subject: [PATCH] Fix git init --shared=all on FreeBSD 4.11 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 --- 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