Date: Sun, 29 Nov 2015 12:35:54 -0500 From: Jason Unovitch <jason.unovitch@gmail.com> To: =?UTF-8?Q?Dag=2DErling_Sm=C3=B8rgrav?= <des@freebsd.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r291453 - head/lib/libfetch Message-ID: <CABW2x9oSjevQswLGworjomQMTKeZfjt2EE9ZC2WD8bThsR=DpQ@mail.gmail.com> In-Reply-To: <201511291427.tATER0lb011244@repo.freebsd.org> References: <201511291427.tATER0lb011244@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Nov 29, 2015 at 9:27 AM, Dag-Erling Sm=C3=B8rgrav <des@freebsd.org>= wrote: > Author: des > Date: Sun Nov 29 14:26:59 2015 > New Revision: 291453 > URL: https://svnweb.freebsd.org/changeset/base/291453 > > Log: > Use .netrc for HTTP sites and proxies, not just FTP. > > PR: 193740 > Submitted by: TEUBEL Gy=C3=B6rgy <tgyurci@gmail.com> > MFC after: 1 week > > Modified: > head/lib/libfetch/fetch.3 > head/lib/libfetch/http.c <snip> > Modified: head/lib/libfetch/http.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/lib/libfetch/http.c Sun Nov 29 13:14:45 2015 (r291452) > +++ head/lib/libfetch/http.c Sun Nov 29 14:26:59 2015 (r291453) > @@ -1658,6 +1658,9 @@ http_request_body(struct url *URL, const > http_seterr(HTTP_NEED_PROXY_AUTH)= ; > goto ouch; > } > + } else if (fetch_netrc_auth(purl) =3D=3D 0) { > + aparams.user =3D strdup(purl->user); > + aparams.password =3D strdup(purl->pwd); > } > http_authorize(conn, "Proxy-Authorization", > &proxy_challenges, &aparams, url); > @@ -1685,6 +1688,11 @@ http_request_body(struct url *URL, const > http_seterr(HTTP_NEED_AUTH); > goto ouch; > } > + } else if (fetch_netrc_auth(url) =3D=3D 0) { > + aparams.user =3D url->user ? > + strdup(url->user) : strdup(""); > + aparams.password =3D url->pwd ? > + strdup(url->pwd) : strdup(""); > } else if (fetchAuthMethod && > fetchAuthMethod(url) =3D=3D 0) { > aparams.user =3D strdup(url->user); > _______________________________________________ `make buildworld` fails after this commit: /usr/src/head/lib/libfetch/http.c:1692:25: error: address of array 'url->user' will always evaluate to 'true' [-Werro r,-Wpointer-bool-conversion] aparams.user =3D url->user ? ~~~~~^~~~ ~ /usr/src/head/lib/libfetch/http.c:1694:29: error: address of array 'url->pwd' will always evaluate to 'true' [-Werror ,-Wpointer-bool-conversion] aparams.password =3D url->pwd ?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CABW2x9oSjevQswLGworjomQMTKeZfjt2EE9ZC2WD8bThsR=DpQ>