git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: Martin Langhoff <martin.langhoff@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: git /objects directory created 755 by default?
Date: Tue, 20 Dec 2005 21:03:21 -0800	[thread overview]
Message-ID: <7vacevdoti.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <46a038f90512201828w618a64dexc22a64b8b6bc2b70@mail.gmail.com> (Martin Langhoff's message of "Wed, 21 Dec 2005 15:28:46 +1300")

Martin Langhoff <martin.langhoff@gmail.com> writes:

>> If so, do your developers use git-shell?
>
> no...

While we established that your problem did not have anything to
do with git-shell, I am tempted to do something like this.

Thoughts?

-- >8 --
[PATCH] Force group writable umask in git-shell

Usually I do not like hardcoded policy in programs, but use of
git-shell is already a policy decision by the repository
administrator to use the shared repository style of development,
and I cannot think of a reason to forbid group (and self, but
that is obvious) writability in such use scenario.

Signed-off-by: Junio C Hamano <junkio@cox.net>

---

diff --git a/shell.c b/shell.c
index cd31618..40a2a97 100644
--- a/shell.c
+++ b/shell.c
@@ -52,6 +52,10 @@ int main(int argc, char **argv)
 		default:
 			continue;
 		}
+		/* Make sure myself and my group members can write
+		 * into what I create.
+		 */
+		umask(umask(0) & ~0770);
 		exit(cmd->exec(cmd->name, arg));
 	}
 	die("unrecognized command '%s'", prog);

  parent reply	other threads:[~2005-12-21  5:03 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-20 23:25 git /objects directory created 755 by default? Martin Langhoff
2005-12-20 23:43 ` Junio C Hamano
2005-12-21  1:37   ` Junio C Hamano
2005-12-21  2:28     ` Martin Langhoff
2005-12-21  4:53       ` Junio C Hamano
2005-12-21  5:10         ` Martin Langhoff
2005-12-21  5:03       ` Junio C Hamano [this message]
2005-12-21  5:15         ` Martin Langhoff
2005-12-21  5:17           ` Junio C Hamano
2005-12-21  5:23             ` Martin Langhoff
2005-12-22  3:46           ` Ben Clifford
2005-12-21 15:35     ` Johannes Schindelin
2005-12-21 22:10       ` Junio C Hamano
2005-12-21 22:20         ` Johannes Schindelin
2005-12-22  9:45           ` Andreas Ericsson
2005-12-22 11:27             ` Johannes Schindelin
2005-12-22 12:28               ` Andreas Ericsson
2005-12-22 14:37                 ` Johannes Schindelin
2005-12-22 15:53                   ` Andreas Ericsson
2005-12-22 16:03                     ` Johannes Schindelin
2005-12-22 16:52                       ` Andreas Ericsson
2005-12-22 17:31                         ` Johannes Schindelin
2005-12-22 19:14                         ` Junio C Hamano
2005-12-22 19:28                           ` Johannes Schindelin
2005-12-22 20:15                             ` Junio C Hamano
2005-12-22 20:27                               ` Johannes Schindelin
2005-12-23  4:19                 ` Junio C Hamano
2005-12-23 12:07                   ` Andreas Ericsson
2005-12-22 10:11           ` Alex Riesen
2005-12-22 11:35             ` Johannes Schindelin
2005-12-22 14:38               ` Alex Riesen
2005-12-22 15:09                 ` Johannes Schindelin
2005-12-22 15:14                   ` Alex Riesen
2005-12-22 15:52                     ` Johannes Schindelin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vacevdoti.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=git@vger.kernel.org \
    --cc=martin.langhoff@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).