The log message for r39692 didn't seem to accurately describe the
change.
[[[
> Fix issue #3498 - Subversion password stores freeze Eclipse
>
> * subversion/libsvn_auth_gnome_keyring/gnome_keyring.c
> (simple_gnome_keyring_first_creds, simple_gnome_keyring_save_creds,
> ssl_client_cert_pw_gnome_keyring_first_creds,
> ssl_client_cert_pw_gnome_keyring_save_creds): Try unlocking GNOME
> Keyring only if a prompt function is provided, else unlock is
> handled by the default GNOME Keyring unlock dialog box.
The code before this change already did try unlocking only if a prompt
function is provided. I have edited the log message to say:
> If the keyring is locked
> and we are in interactive mode but have no unlock prompt function, don't
> throw a "GNOME Keyring is locked and we are non-interactive" error;
> instead, continue without unlocking it, so that the unlocking may be
> handled by the default GNOME Keyring unlock dialog box.
- Julian
> ------------------------------------------------------------------------
> Index: subversion/libsvn_auth_gnome_keyring/gnome_keyring.c
> ===================================================================
> --- subversion/libsvn_auth_gnome_keyring/gnome_keyring.c (revision 39691)
> +++ subversion/libsvn_auth_gnome_keyring/gnome_keyring.c (revision 39692)
> @@ -390,39 +390,34 @@
>
> char *keyring_password;
>
> - if (check_keyring_is_locked(default_keyring))
> + if (unlock_prompt_func && check_keyring_is_locked(default_keyring))
> {
> - if (unlock_prompt_func)
> - {
> - SVN_ERR((*unlock_prompt_func)(&keyring_password,
> - default_keyring,
> - unlock_prompt_baton,
> - pool));
> -
> - /* If keyring is locked give up and try the next provider. */
> - if (! unlock_gnome_keyring(default_keyring, keyring_password,
> - pool))
> - return SVN_NO_ERROR;
> - }
> + SVN_ERR((*unlock_prompt_func)(&keyring_password,
> + default_keyring,
> + unlock_prompt_baton,
> + pool));
> +
> + /* If keyring is locked give up and try the next provider. */
> + if (! unlock_gnome_keyring(default_keyring, keyring_password, pool))
> + return SVN_NO_ERROR;
> }
For anyone trying to read this diff: The change above is cosmetic. The
only functional change is below, moving the error into an "else" clause
of the outer "if (! non-interactive)" block (which is not visible in the
diff context).
> }
> -
> - if (check_keyring_is_locked(default_keyring))
> - {
> - return svn_error_create(SVN_ERR_AUTHN_CREDS_UNAVAILABLE, NULL,
> - _("GNOME Keyring is locked and "
> - "we are non-interactive"));
> - }
> else
> - {
> - return svn_auth__simple_first_creds_helper
> - (credentials,
> - iter_baton, provider_baton,
> - parameters, realmstring,
> - password_get_gnome_keyring,
> - SVN_AUTH__GNOME_KEYRING_PASSWORD_TYPE,
> - pool);
> + {
> + if (check_keyring_is_locked(default_keyring))
> + {
> + return svn_error_create(SVN_ERR_AUTHN_CREDS_UNAVAILABLE, NULL,
> + _("GNOME Keyring is locked and "
> + "we are non-interactive"));
> + }
> }
> + return svn_auth__simple_first_creds_helper
> + (credentials,
> + iter_baton, provider_baton,
> + parameters, realmstring,
> + password_get_gnome_keyring,
> + SVN_AUTH__GNOME_KEYRING_PASSWORD_TYPE,
> + pool);
> }
]]]
- Julian
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2407482
Received on 2009-10-14 12:22:05 CEST