[ CCing Stefan as he pointed out (2) and worked with this code recently. ]
Karl Fogel wrote on Tue, 22 Apr 2008 at 14:20 -0400:
> Daniel Shahaf <d.s_at_daniel.shahaf.co.il> writes:
> > 1. If 'store-passwords' (in ~/.subversion/config) was set to FALSE,
> > then usernames would not be cached either.
> > 2. simple_save_creds_helper only checked CREDS->may_save, but
> > ignored its SVN_AUTH_PARAM_NO_AUTH_CACHE parameter.
> > (stsp pointed this out)
> What was the user-visible manifestation of (2) ?
[ Summary: API violation, cmdline client probably unaffected. ]
The documentation of SVN_AUTH_PARAM_NO_AUTH_CACHE requires:
/** @brief The application doesn't want any providers to save credentials
* to disk. Property value is irrelevant; only property's existence
* matters. */
#define SVN_AUTH_PARAM_NO_AUTH_CACHE SVN_AUTH_PARAM_PREFIX "no-auth-cache"
However, the simple provider (simple_first_creds_helper) does not inspect
SVN_AUTH_PARAM_NO_AUTH_CACHE when it sets CREDS->may_save. (It only
inspects the cached 'password type' and the API equivalents of --username
and --password.) This might be considered an API violation.
As to user-visible manifestation, however, I have not succeeded in
reproducing this situation (where may_save is TRUE and
SVN_AUTH_PARAM_NO_AUTH_CACHE is set) with the cmdline client, because
svn_auth_save_credentials checks and does not call the provider if
SVN_AUTH_PARAM_NO_AUTH_CACHE is set:
290 svn_auth_save_credentials(svn_auth_iterstate_t *state,
291 apr_pool_t *pool)
309 /* Do not save the creds if SVN_AUTH_PARAM_NO_AUTH_CACHE is set */
310 no_auth_cache = apr_hash_get(auth_baton->parameters,
313 if (no_auth_cache)
314 return SVN_NO_ERROR;
316 /* First, try to save the creds using the provider that produced them. */
317 provider = APR_ARRAY_IDX(state->table->providers,
319 svn_auth_provider_object_t *);
320 if (provider->vtable->save_credentials)
In other words, by the time the simple provider (simple_save_creds_helper)
is called, it has already been established for it that
SVN_AUTH_PARAM_NO_AUTH_CACHE is not set.
Sorry for not explaining all this originally.
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-04-22 22:03:30 CEST