git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] http: Control GSSAPI credential delegation.

From
Jeff King <peff@peff.net>
Date
Sep 28, 2016, 17:16 UTC
Message-ID
<20160928171610.pbghg4sk23vm4xnp@sigill.intra.peff.net>
In-Reply-To
<1475078752-31195-1-git-send-email-pstodulk@redhat.com>
On Wed, Sep 28, 2016 at 06:05:52PM +0200, Petr Stodulka wrote:
Show 6 quoted lines
> Delegation of credentials is disabled by default in libcurl since
> version 7.21.7 due to security vulnerability CVE-2011-2192. Which
> makes troubles with GSS/kerberos authentication where delegation
> of credentials is required. This can be changed with option
> CURLOPT_GSSAPI_DELEGATION in libcurl with set expected parameter
> since libcurl version 7.22.0.

I don't have any real knowledge of GSSAPI, so I'll refrain from commenting on that aspect. But I did notice one mechanical issue:

Show 11 quoted lines
> +#if LIBCURL_VERSION_NUM >= 0x071600
> +static const char *curl_deleg;
> +static struct {
> +	const char *name;
> +	long curl_deleg_param;
> +} curl_deleg_levels[] = {
> +	{ "none", CURLGSSAPI_DELEGATION_NONE },
> +	{ "policy", CURLGSSAPI_DELEGATION_POLICY_FLAG },
> +	{ "always", CURLGSSAPI_DELEGATION_FLAG },
> +};
> +#endif

We only declare the curl_deleg variable if we have a new-enough curl. But...

Show 8 quoted lines
> @@ -323,6 +335,10 @@ static int http_options(const char *var, const char *value, void *cb)
>  		return 0;
>  	}
>  
> +	if (!strcmp("http.delegation", var)) {
> +		return git_config_string(&curl_deleg, var, value);
> +	}
> +

...here we try to use it regardless. I think you want another #ifdef, and probably to warn the user in the #else block (similar to what the http.pinnedpubkey code does).

-Peff
Previous: Petr StodulkaNext: Petr Stodulka
Message 3 of 7 in “http: Control GSSAPI credential delegation.”
  1. http: Control GSSAPI credential delegation.Petr Stodulka, Sep 28, 2016
  2. Petr StodulkaSep 28, 2016
  3. Jeff KingSep 28, 2016
  4. http: Control GSSAPI credential delegation.Petr Stodulka, Sep 28, 2016
  5. brian m. carlsonSep 29, 2016
  6. Petr StodulkaSep 28, 2016
  7. Junio C HamanoSep 28, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.