git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Robert <yayooo@gmail.com>
To: git@vger.kernel.org
Subject: Re: http.receivepack==false && authenticated => Service not enabled
Date: Wed, 11 May 2011 10:26:29 +0000	[thread overview]
Message-ID: <BANLkTi=14G2WvfoHfhJn_u_NDHnL+6cqCQ@mail.gmail.com> (raw)
In-Reply-To: <BANLkTikZdvW1ptVNBiJpCX7jdrqxq=CaDA@mail.gmail.com>

Sorry!It is my wrong ! It is not a bug !

On Wed, May 11, 2011 at 10:21, Robert <yayooo@gmail.com> wrote:
> Even a authenticated  user can not push when http.receivepack set to false.
> when
> git config http.receivepack false
> svc->enabled was set to 0 not -1
> so we should initialize with 0 not -1
>
> --- http-backend.c      Thu May  5 01:16:14 2011
> +++ http-backend.c   Wed May 11 09:57:52 2011
> @@ -23,7 +23,7 @@
>
>  static struct rpc_service rpc_service[] = {
>        { "upload-pack", "uploadpack", 1 },
> -       { "receive-pack", "receivepack", -1 },
> +       { "receive-pack", "receivepack", 0 },
>  };
>
>  static struct string_list *get_parameters(void)
> @@ -260,8 +260,8 @@
>        if (!svc)
>                forbidden("Unsupported service: '%s'", name);
>
> -       if (svc->enabled < 0) {
>                const char *user = getenv("REMOTE_USER");
> +       if (!svc->enabled) {
>                svc->enabled = (user && *user) ? 1 : 0;
>        }
>        if (!svc->enabled)
>

      reply	other threads:[~2011-05-11 15:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-11 10:21 http.receivepack==false && authenticated => Service not enabled Robert
2011-05-11 10:26 ` Robert [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='BANLkTi=14G2WvfoHfhJn_u_NDHnL+6cqCQ@mail.gmail.com' \
    --to=yayooo@gmail.com \
    --cc=git@vger.kernel.org \
    /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).