From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Alex Riesen <raa.lkml@gmail.com>,
git@vger.kernel.org, Daniel Barkalow <barkalow@iabervon.org>
Subject: Re: [PATCH] rerere: make rr-cache fanout directory honor umask
Date: Tue, 10 Jul 2012 02:37:22 -0400 [thread overview]
Message-ID: <20120710063721.GA6347@sigill.intra.peff.net> (raw)
In-Reply-To: <7vsjd0ikfe.fsf_-_@alter.siamese.dyndns.org>
On Mon, Jul 09, 2012 at 04:28:21PM -0700, Junio C Hamano wrote:
> This is the last remaining call to mkdir(2) that restricts the permission
> bits by passing 0755. Just use the same mkdir_in_gitdir() used to create
> the leaf directories.
>
> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Looks obviously correct to me.
I notice that grepping finds a few 0644 modes, too. Most of them are
false-positives (e.g., we store and transmit 100644 as a shorthand for
"normal non-executable permissions"). This is the only one that looked
legitimate to me:
-- >8 --
Subject: [PATCH] add: create ADD_EDIT.patch with mode 0666
We should be letting the user's umask take care of
restricting permissions. Even though this is a temporary
file and probably nobody would notice, this brings us in
line with other temporary file creations in git (e.g.,
choosing "e"dit from git-add--interactive).
Signed-off-by: Jeff King <peff@peff.net>
---
builtin/add.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builtin/add.c b/builtin/add.c
index 41edd63..815ac4b 100644
--- a/builtin/add.c
+++ b/builtin/add.c
@@ -287,7 +287,7 @@ static int edit_patch(int argc, const char **argv, const char *prefix)
argc = setup_revisions(argc, argv, &rev, NULL);
rev.diffopt.output_format = DIFF_FORMAT_PATCH;
DIFF_OPT_SET(&rev.diffopt, IGNORE_DIRTY_SUBMODULES);
- out = open(file, O_CREAT | O_WRONLY, 0644);
+ out = open(file, O_CREAT | O_WRONLY, 0666);
if (out < 0)
die (_("Could not open '%s' for writing."), file);
rev.diffopt.file = xfdopen(out, "w");
--
1.7.10.5.16.ga1c6f1c
prev parent reply other threads:[~2012-07-10 6:37 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-06 19:27 git-clone ignores umask for working tree Alex Riesen
2012-07-06 21:20 ` Daniel Barkalow
2012-07-07 21:50 ` [PATCH] Restore umasks influence on the permissions of work tree created by clone Alex Riesen
2012-07-09 1:41 ` Junio C Hamano
2012-07-09 18:21 ` Alex Riesen
2012-07-09 22:58 ` Jeff King
2012-07-09 23:07 ` Junio C Hamano
2012-07-09 23:18 ` Junio C Hamano
2012-07-09 23:28 ` [PATCH] rerere: make rr-cache fanout directory honor umask Junio C Hamano
2012-07-10 6:37 ` Jeff King [this message]
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=20120710063721.GA6347@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=barkalow@iabervon.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=raa.lkml@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).