git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: "Kyle Moffett" <kyle@moffetthome.net>,
	demerphq <demerphq@gmail.com>, "Ævar Arnfjörð" <avarab@gmail.com>,
	"Git Mailing List" <git@vger.kernel.org>
Subject: Re: General support for ! in git-config values
Date: Fri, 3 Feb 2012 07:13:52 -0500	[thread overview]
Message-ID: <20120203121352.GD31441@sigill.intra.peff.net> (raw)
In-Reply-To: <7vmx90say8.fsf@alter.siamese.dyndns.org>

On Thu, Feb 02, 2012 at 10:11:27PM -0800, Junio C Hamano wrote:

> Kyle Moffett <kyle@moffetthome.net> writes:
> 
> > Alternatively, you could extend the recent proposal for GIT config
> > "include" statements so that something like this works:
> >
> > [include]
> >     exec = echo "deploy.prefix = `cat /etc/SERVER_ROLE`"
> >     exec = /usr/local/bin/git-config-for-ldap-user
> 
> Erh...
> 
> Running known stuff from your own .git/config may be justifiable as "at
> your own risk", but if we consider sources that are not under your direct
> control, such as /etc/gitconfig and whatever your project encourages you
> to include from your .git/config,... eek.

For normal use, I don't see this as a big deal. They could also be
specifying diff.external, which would run arbitrary code (and who
doesn't run "git diff" once in a while?).

I see it as a bigger issue for sites which serve repositories on behalf
of their users, and already take care never to use porcelain commands
which will run arbitrary code from the config by default (e.g., gitweb
carefully uses diff plumbing for this reason). Introducing such an
option provides a mechanism for users who control the config of the
served repositories to execute code as the user running git-daemon or
gitweb.

-Peff

  parent reply	other threads:[~2012-02-03 12:13 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-01 17:33 General support for ! in git-config values Ævar Arnfjörð Bjarmason
2012-02-01 18:40 ` Jeff King
2012-02-01 21:25   ` Ævar Arnfjörð Bjarmason
2012-02-01 22:21     ` Junio C Hamano
2012-02-02  0:16       ` demerphq
2012-02-02  0:27         ` Junio C Hamano
2012-02-02  1:14           ` demerphq
2012-02-02  1:39             ` Junio C Hamano
2012-02-02  1:57               ` demerphq
2012-02-02  2:38                 ` Jeff King
2012-02-02  9:44                   ` demerphq
2012-02-02  9:54                     ` Jeff King
2012-02-02 10:21                       ` demerphq
2012-02-03  5:08                         ` Kyle Moffett
2012-02-03  6:11                           ` Junio C Hamano
2012-02-03  7:35                             ` Kyle Moffett
2012-02-03 12:13                             ` Jeff King [this message]
2012-02-03 12:09                           ` Jeff King
2012-02-02  1:41             ` Junio C Hamano
2012-02-02  2:06               ` demerphq

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=20120203121352.GD31441@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=avarab@gmail.com \
    --cc=demerphq@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=kyle@moffetthome.net \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).