git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: "Springer, Stephan" <springer@sloman-neptun.com>
Cc: "'git@vger.kernel.org'" <git@vger.kernel.org>
Subject: Re: BUG in http-backend.c  > http.receivepack
Date: Mon, 24 Nov 2014 22:56:19 -0500	[thread overview]
Message-ID: <20141125035618.GA19301@peff.net> (raw)
In-Reply-To: <F9AF62ADACFFBA47BEEADC5C12509F3401226EE8F8@Hermes.sns.local>

On Mon, Nov 24, 2014 at 09:18:52AM +0100, Springer, Stephan wrote:

> I found bug in http-backend.c with config-flag "http.receivepack"  You
> describe in our documentation: "This serves git send-pack clients,
> allowing push. It is disabled by default for anonymous users, and
> enabled by default for users authenticated by the web server. It can
> be disabled by setting this item to false, or enabled for all users,
> including anonymous users, by setting it to true."
> That cannot work, while svc-enable less than 0. See attachment

Sorry, I don't quite understand. The "enabled" field is one of:

  -1: we allow access if $REMOTE_USER is set, and otherwise not
   0: we never allow access
   1: we always allow access

The default is -1. By setting it to "true" or "false" you get 1 or 0,
respectively. You cannot explicitly ask for the default, except by not
setting the value in the first place.

>         #
>         # better (svc->enabled <= 0) than can ?REMOTE_USER? enable push function 
>         #
>         if (svc->enabled < 0) {        
>                const char *user = getenv("REMOTE_USER");
>                svc->enabled = (user && *user) ? 1 : 0;
>         }

If this condition were "svc->enabled <= 0", then setting the config
option to "false", which should turn off access, will respect
$REMOTE_USER instead. That is not right.

Can you describe what you're configuring and running, what behavior you
expect, and what you get instead?

-Peff

      reply	other threads:[~2014-11-25  3:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-24  8:18 BUG in http-backend.c > http.receivepack Springer, Stephan
2014-11-25  3:56 ` 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=20141125035618.GA19301@peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=springer@sloman-neptun.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).