[prev in list] [next in list] [prev in thread] [next in thread] 

List:       git
Subject:    Re: [PATCH v2] config: preserve config file permissions on edits
From:       Jeff King <peff () peff ! net>
Date:       2014-05-06 22:02:36
Message-ID: 20140506220236.GB30185 () sigill ! intra ! peff ! net
[Download RAW message or body]

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.

> +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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic