Re: http.receivepack==false && authenticated => Service not enabled

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

On Wed, May 11, 2011 at 10:21, Robert <yayooo@xxxxxxxxx> 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)
>
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]