From owner-svn-src-head@freebsd.org Sun Nov 29 17:35:55 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2A87AA3CAB6; Sun, 29 Nov 2015 17:35:55 +0000 (UTC) (envelope-from jason.unovitch@gmail.com) Received: from mail-io0-x22f.google.com (mail-io0-x22f.google.com [IPv6:2607:f8b0:4001:c06::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id ECA1F15B5; Sun, 29 Nov 2015 17:35:54 +0000 (UTC) (envelope-from jason.unovitch@gmail.com) Received: by ioir85 with SMTP id r85so152450352ioi.1; Sun, 29 Nov 2015 09:35:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=bua9HSveQmXB1zOxkw42aYJh4y9u11KN++FqCu1RuOE=; b=ZgW3ItlJnZ6d6WetXPKL6U24I/vcJsPNGMLYdejx1HY0PKDCYiXFqhNKgG+uqHMmEm zPpHF5CfI9IfjKMl82WE2huFZCOr8XJJnk28CiW8BUmczt/62YB5UIcoTbRt0Vo+T34a 2y9rEZHdKrGiTu7WimWwOaSxy/Dl/OoLqJYE6NEafh7U7a558cab8VLxYiuP8xIJ1o3Z 9JcFB+Y7FLWZ6H8kO/qhoGKAxcjK5TWm2F8W++LJ21CqEEQ8a+1Y1/rfhB0Qj64OGFLa FFbqxjkhArP0HD904QLC/Xi1EswTcQfRRaabrq038ewcuM5ygbEoj7dQOyDhAmWauPIO 4zLA== MIME-Version: 1.0 X-Received: by 10.107.130.167 with SMTP id m39mr55739192ioi.18.1448818554359; Sun, 29 Nov 2015 09:35:54 -0800 (PST) Received: by 10.36.43.23 with HTTP; Sun, 29 Nov 2015 09:35:54 -0800 (PST) In-Reply-To: <201511291427.tATER0lb011244@repo.freebsd.org> References: <201511291427.tATER0lb011244@repo.freebsd.org> Date: Sun, 29 Nov 2015 12:35:54 -0500 Message-ID: Subject: Re: svn commit: r291453 - head/lib/libfetch From: Jason Unovitch To: =?UTF-8?Q?Dag=2DErling_Sm=C3=B8rgrav?= Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Nov 2015 17:35:55 -0000 On Sun, Nov 29, 2015 at 9:27 AM, Dag-Erling Sm=C3=B8rgrav = 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 > MFC after: 1 week > > Modified: > head/lib/libfetch/fetch.3 > head/lib/libfetch/http.c > 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 ?