Re: [PATCH v2] remote-curl: fall back to Basic auth if Negotiate fails
- From
Jeff King <peff@peff.net>
- Date
- Jan 3, 2015, 20:14 UTC
- Message-ID
- <20150103201444.GA8285@peff.net>
- In-Reply-To
- <20150103174509.GA1025060@vauxhall.crustytoothpaste.net>
On Sat, Jan 03, 2015 at 05:45:09PM +0000, brian m. carlson wrote:
Show 6 quoted lines
> >+ {
> >+ int flags = CURLAUTH_ANY;
>
> I think this needs to be unsigned long or it can cause undefined behavior,
> since libcurl uses unsigned long in the flags. I'll fix that up when I
> reroll. I'll need your sign-off since it will essentially be your work.I think curl typically uses signed "long" for flags, but certainly check the docs to be sure.
I was thinking it would be integer-promoted in this case, but I'm not sure that works always (certainly it does not if CURLAUTH_ANY needs high bits, but depending on how curl_easy_setopt is implemented, it may also be implicitly cast as a pointer or something).
And certainly you can have my signoff:
Signed-off-by: Jeff King <peff@peff.net>
-Peff