Thread (9 messages) 9 messages, 6 authors, 2016-06-15

Re: [PATCH v2] config: preserve config file permissions on edits

flat view

From: Jeff King <hidden>
Date: 2016-06-15 23:01:02

On Tue, May 06, 2014 at 12:17:14AM +0000, Eric Wong wrote:
Users may already store sensitive data such as imap.pass in
.git/config; making the file world-readable when "git config"
is called to edit means their password would be compromised
on a shared system.
Makes sense, and the patch looks good to me.
quoted hunk ↗ jump to hunk
+test_expect_success POSIXPERM,PERL 'preserves existing permissions' '
+	chmod 0600 .git/config &&
+	git config imap.pass Hunter2 &&
+	perl -e \
+	  "die q(badset) if ((stat(q(.git/config)))[2] & 07777) != 0600" &&
I don't think we usually bother with a PERL prereq for running
one-liners like this from the test script, though I don't think it hurts
anything to do so.

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help