[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r1005065 - in /subversion/branches/gpg-agent-password-store: ./ build/generator/ subversion/include/ subversion/include/private/ subversion/libsvn_auth_gpg_agent/ subversion/libsvn_subr/

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Mon, 18 Oct 2010 07:35:46 +0200

stylesen_at_apache.org wrote on Wed, Oct 06, 2010 at 14:41:35 -0000:
> + value = getenv( "GPG_AGENT_INFO");
> +
> + if (value != NULL)
> + {
> + gpg_agent_info = apr_pstrmemdup(pool, value, strlen(value));
> + socket_details = svn_cstring_split(gpg_agent_info, ":", TRUE, pool);
> + socket_name = APR_ARRAY_IDX(socket_details, 0, const char *);
> + }
> + else
> + return FALSE;
> +
> + value = getenv("GPG_TTY");
> + if (value != NULL)
> + tty_name = apr_pstrmemdup(pool, value, strlen(value));
> + else
> + return FALSE;
> +
> + value = getenv("TERM");
> + if (value != NULL)
> + tty_type = apr_pstrmemdup(pool, value, strlen(value));
> + else
> + return FALSE;

getenv("TERM") will fail in GUI programs, won't it?

e.g., under gvim, ':echo $TERM' shows nothing. So, is it the case that,
as written, gpg support will only be available to cmdline programs, but
not to generic library users?

Another point: error checking. The calls to send(), close(),
svn_checksum() (and maybe others) don't check the return values.
Received on 2010-10-18 07:37:20 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.