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

Re: svn commit: r35314 - in trunk/subversion: include include/private libsvn_auth_gnome_keyring libsvn_subr

From: Hyrum K. Wright <hyrum_wright_at_mail.utexas.edu>
Date: Mon, 19 Jan 2009 09:59:00 -0600

This change seems to have broken the swig bindings on Mac OS X and Windows.
Anybody have any ideas why?

-Hyrum

Arfrever Frehtes Taifersar Arahesis wrote:
> Author: arfrever
> Date: Sun Jan 18 09:55:07 2009
> New Revision: 35314
>
> Log:
> Rename svn_auth_unlock_prompt_func_t to
> svn_auth_gnome_keyring_unlock_prompt_func_t.
> Rename svn_cmdline_auth_unlock_prompt() to
> svn_cmdline__auth_gnome_keyring_unlock_prompt().
>
> * subversion/include/svn_auth.h
> (svn_auth_unlock_prompt_func_t): Rename to ...
> (svn_auth_gnome_keyring_unlock_prompt_func_t): ... this.
> (svn_auth_get_gnome_keyring_simple_provider,
> svn_auth_get_gnome_keyring_ssl_client_cert_pw_provider): Fix doc string.
>
> * subversion/include/svn_cmdline.h
> * subversion/libsvn_subr/prompt.c
> (svn_cmdline_auth_unlock_prompt): Rename to ...
> * subversion/include/private/svn_cmdline_private.h
> * subversion/libsvn_subr/prompt.c
> (svn_cmdline__auth_gnome_keyring_unlock_prompt): ... this.
>
> * 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): Update.
> * subversion/libsvn_subr/cmdline.c
> (svn_cmdline_create_auth_baton): Update.
>
> Modified:
> trunk/subversion/include/private/svn_cmdline_private.h
> trunk/subversion/include/svn_auth.h
> trunk/subversion/include/svn_cmdline.h
> trunk/subversion/libsvn_auth_gnome_keyring/gnome_keyring.c
> trunk/subversion/libsvn_subr/cmdline.c
> trunk/subversion/libsvn_subr/prompt.c
>
> Modified: trunk/subversion/include/private/svn_cmdline_private.h
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/include/private/svn_cmdline_private.h?pathrev=35314&r1=35313&r2=35314
> ==============================================================================
> --- trunk/subversion/include/private/svn_cmdline_private.h Sun Jan 18 08:37:15 2009 (r35313)
> +++ trunk/subversion/include/private/svn_cmdline_private.h Sun Jan 18 09:55:07 2009 (r35314)
> @@ -1,7 +1,7 @@
> /**
> * @copyright
> * ====================================================================
> - * Copyright (c) 2008 CollabNet. All rights reserved.
> + * Copyright (c) 2008-2009 CollabNet. All rights reserved.
> *
> * This software is licensed as described in the file COPYING, which
> * you should have received as part of this distribution. The terms
> @@ -42,6 +42,19 @@ svn_cmdline__print_xml_prop(svn_stringbu
> svn_string_t *propval,
> apr_pool_t *pool);
>
> +
> +/** An implementation of @c svn_auth_gnome_keyring_unlock_prompt_func_t that
> + * prompts the user for default GNOME Keyring password.
> + *
> + * Expects a @c svn_cmdline_prompt_baton2_t to be passed as @a baton.
> + *
> + * @since New in 1.6.
> + */
> +svn_error_t *
> +svn_cmdline__auth_gnome_keyring_unlock_prompt(char **keyring_password,
> + const char *keyring_name,
> + void *baton,
> + apr_pool_t *pool);
> #ifdef __cplusplus
> }
> #endif /* __cplusplus */
>
> Modified: trunk/subversion/include/svn_auth.h
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/include/svn_auth.h?pathrev=35314&r1=35313&r2=35314
> ==============================================================================
> --- trunk/subversion/include/svn_auth.h Sun Jan 18 08:37:15 2009 (r35313)
> +++ trunk/subversion/include/svn_auth.h Sun Jan 18 09:55:07 2009 (r35314)
> @@ -512,26 +512,6 @@ typedef svn_error_t *(*svn_auth_plaintex
> void *baton,
> apr_pool_t *pool);
>
> -/** A type of callback function for obtaining the default keyring password.
> - * ### Is this type of callback specific to the GNOME Keyring?
> - * ### Is this type of callback specific to the default keyring?
> - *
> - * In this callback, the client should ask the user for default keyring
> - * @a keyring_name password.
> - *
> - * The answer is returned in @a *keyring_password.
> - * @a baton is an implementation-specific closure.
> - * All allocations should be done in @a pool.
> - *
> - * @since New in 1.6
> - */
> -typedef svn_error_t *(*svn_auth_unlock_prompt_func_t)
> - (char **keyring_password,
> - const char *keyring_name,
> - void *baton,
> - apr_pool_t *pool);
> -
> -
>
> /** Initialize an authentication system.
> *
> @@ -945,24 +925,46 @@ svn_auth_get_keychain_ssl_client_cert_pw
> #endif /* DARWIN || DOXYGEN */
>
> #if (!defined(DARWIN) && !defined(WIN32)) || defined(DOXYGEN)
> -/**
> - * Get libsvn_auth_gnome_keyring version information.
> +/** A type of callback function for obtaining the GNOME Keyring password.
> + *
> + * In this callback, the client should ask the user for default keyring
> + * @a keyring_name password.
> + *
> + * The answer is returned in @a *keyring_password.
> + * @a baton is an implementation-specific closure.
> + * All allocations should be done in @a pool.
> *
> * @since New in 1.6
> */
> -const svn_version_t *
> -svn_auth_gnome_keyring_version(void);
> +typedef svn_error_t *(*svn_auth_gnome_keyring_unlock_prompt_func_t)
> + (char **keyring_password,
> + const char *keyring_name,
> + void *baton,
> + apr_pool_t *pool);
> +
>
> +/** libsvn_auth_gnome_keyring-specific run-time parameters. */
>
> -/** @brief The function which prompts user for GNOME Keyring password. */
> +/** @brief The pointer to function which prompts user for GNOME Keyring
> + * password.
> + * The type of this pointer should be svn_auth_gnome_keyring_unlock_prompt_func_t. */
> #define SVN_AUTH_PARAM_GNOME_KEYRING_UNLOCK_PROMPT_FUNC "gnome-keyring-unlock-prompt-func"
>
> /** @brief The baton which is passed to
> - * @c SVN_AUTH_PARAM_GNOME_KEYRING_UNLOCK_PROMPT_FUNC. */
> + * @c *SVN_AUTH_PARAM_GNOME_KEYRING_UNLOCK_PROMPT_FUNC. */
> #define SVN_AUTH_PARAM_GNOME_KEYRING_UNLOCK_PROMPT_BATON "gnome-keyring-unlock-prompt-baton"
>
>
> /**
> + * Get libsvn_auth_gnome_keyring version information.
> + *
> + * @since New in 1.6
> + */
> +const svn_version_t *
> +svn_auth_gnome_keyring_version(void);
> +
> +
> +/**
> * Set @a *provider to an authentication provider of type @c
> * svn_auth_cred_simple_t that gets/sets information from the user's
> * ~/.subversion configuration directory.
> @@ -971,11 +973,11 @@ svn_auth_gnome_keyring_version(void);
> * password is stored in GNOME Keyring.
> *
> * If the GNOME Keyring is locked the provider calls
> - * @c SVN_AUTH_PARAM_GNOME_KEYRING_UNLOCK_PROMPT_FUNC in order to unlock
> + * @c *SVN_AUTH_PARAM_GNOME_KEYRING_UNLOCK_PROMPT_FUNC in order to unlock
> * the keyring.
> *
> * @c SVN_AUTH_PARAM_GNOME_KEYRING_UNLOCK_PROMPT_BATON is passed to
> - * @c SVN_AUTH_PARAM_GNOME_KEYRING_UNLOCK_PROMPT_FUNC.
> + * @c *SVN_AUTH_PARAM_GNOME_KEYRING_UNLOCK_PROMPT_FUNC.
> *
> * Allocate @a *provider in @a pool.
> *
> @@ -992,12 +994,20 @@ svn_auth_get_gnome_keyring_simple_provid
> /**
> * Set @a *provider to an authentication provider of type @c
> * svn_auth_cred_ssl_client_cert_pw_t that gets/sets information from the
> - * user's ~/.subversion configuration directory. Allocate @a *provider in
> - * @a pool.
> + * user's ~/.subversion configuration directory.
> *
> * This is like svn_client_get_ssl_client_cert_pw_file_provider(), except
> * that the password is stored in GNOME Keyring.
> *
> + * If the GNOME Keyring is locked the provider calls
> + * @c *SVN_AUTH_PARAM_GNOME_KEYRING_UNLOCK_PROMPT_FUNC in order to unlock
> + * the keyring.
> + *
> + * @c SVN_AUTH_PARAM_GNOME_KEYRING_UNLOCK_PROMPT_BATON is passed to
> + * @c *SVN_AUTH_PARAM_GNOME_KEYRING_UNLOCK_PROMPT_FUNC.
> + *
> + * Allocate @a *provider in @a pool.
> + *
> * @since New in 1.6
> * @note This function actually works only on systems with
> * libsvn_auth_gnome_keyring and GNOME Keyring installed.
>
> Modified: trunk/subversion/include/svn_cmdline.h
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/include/svn_cmdline.h?pathrev=35314&r1=35313&r2=35314
> ==============================================================================
> --- trunk/subversion/include/svn_cmdline.h Sun Jan 18 08:37:15 2009 (r35313)
> +++ trunk/subversion/include/svn_cmdline.h Sun Jan 18 09:55:07 2009 (r35314)
> @@ -1,7 +1,7 @@
> /**
> * @copyright
> * ====================================================================
> - * Copyright (c) 2000-2004, 2008 CollabNet. All rights reserved.
> + * Copyright (c) 2000-2004, 2008-2009 CollabNet. All rights reserved.
> *
> * This software is licensed as described in the file COPYING, which
> * you should have received as part of this distribution. The terms
> @@ -308,18 +308,6 @@ svn_cmdline_auth_plaintext_passphrase_pr
> void *baton,
> apr_pool_t *pool);
>
> -/** An implementation of @c svn_auth_unlock_prompt_func_t that
> - * prompts the user for default GNOME Keyring password.
> - *
> - * Expects a @c svn_cmdline_prompt_baton2_t to be passed as @a baton.
> - *
> - * @since New in 1.6.
> - */
> -svn_error_t *
> -svn_cmdline_auth_unlock_prompt(char **keyring_password,
> - const char *keyring_name,
> - void *baton,
> - apr_pool_t *pool);
>
> /** Set @a *ab to an authentication baton allocated from @a pool and
> * initialized with the standard set of authentication providers used
>
> Modified: trunk/subversion/libsvn_auth_gnome_keyring/gnome_keyring.c
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_auth_gnome_keyring/gnome_keyring.c?pathrev=35314&r1=35313&r2=35314
> ==============================================================================
> --- trunk/subversion/libsvn_auth_gnome_keyring/gnome_keyring.c Sun Jan 18 08:37:15 2009 (r35313)
> +++ trunk/subversion/libsvn_auth_gnome_keyring/gnome_keyring.c Sun Jan 18 09:55:07 2009 (r35314)
> @@ -384,7 +384,7 @@ simple_gnome_keyring_first_creds(void **
> const char *realmstring,
> apr_pool_t *pool)
> {
> - svn_auth_unlock_prompt_func_t unlock_prompt_func =
> + svn_auth_gnome_keyring_unlock_prompt_func_t unlock_prompt_func =
> apr_hash_get(parameters,
> SVN_AUTH_PARAM_GNOME_KEYRING_UNLOCK_PROMPT_FUNC,
> APR_HASH_KEY_STRING);
> @@ -399,10 +399,10 @@ simple_gnome_keyring_first_creds(void **
> {
> if (unlock_prompt_func)
> {
> - SVN_ERR(unlock_prompt_func(&keyring_password,
> - default_keyring,
> - unlock_prompt_baton,
> - pool));
> + SVN_ERR((*unlock_prompt_func)(&keyring_password,
> + default_keyring,
> + unlock_prompt_baton,
> + pool));
> unlock_gnome_keyring(default_keyring, keyring_password,
> pool);
> }
> @@ -425,7 +425,7 @@ simple_gnome_keyring_save_creds(svn_bool
> const char *realmstring,
> apr_pool_t *pool)
> {
> - svn_auth_unlock_prompt_func_t unlock_prompt_func =
> + svn_auth_gnome_keyring_unlock_prompt_func_t unlock_prompt_func =
> apr_hash_get(parameters,
> SVN_AUTH_PARAM_GNOME_KEYRING_UNLOCK_PROMPT_FUNC,
> APR_HASH_KEY_STRING);
> @@ -440,10 +440,10 @@ simple_gnome_keyring_save_creds(svn_bool
> {
> if (unlock_prompt_func)
> {
> - SVN_ERR(unlock_prompt_func(&keyring_password,
> - default_keyring,
> - unlock_prompt_baton,
> - pool));
> + SVN_ERR((*unlock_prompt_func)(&keyring_password,
> + default_keyring,
> + unlock_prompt_baton,
> + pool));
> unlock_gnome_keyring(default_keyring, keyring_password,
> pool);
> }
> @@ -503,7 +503,7 @@ ssl_client_cert_pw_gnome_keyring_first_c
> const char *realmstring,
> apr_pool_t *pool)
> {
> - svn_auth_unlock_prompt_func_t unlock_prompt_func =
> + svn_auth_gnome_keyring_unlock_prompt_func_t unlock_prompt_func =
> apr_hash_get(parameters,
> SVN_AUTH_PARAM_GNOME_KEYRING_UNLOCK_PROMPT_FUNC,
> APR_HASH_KEY_STRING);
> @@ -518,10 +518,10 @@ ssl_client_cert_pw_gnome_keyring_first_c
> {
> if (unlock_prompt_func)
> {
> - SVN_ERR(unlock_prompt_func(&keyring_password,
> - default_keyring,
> - unlock_prompt_baton,
> - pool));
> + SVN_ERR((*unlock_prompt_func)(&keyring_password,
> + default_keyring,
> + unlock_prompt_baton,
> + pool));
> unlock_gnome_keyring(default_keyring, keyring_password,
> pool);
> }
> @@ -546,7 +546,7 @@ ssl_client_cert_pw_gnome_keyring_save_cr
> const char *realmstring,
> apr_pool_t *pool)
> {
> - svn_auth_unlock_prompt_func_t unlock_prompt_func =
> + svn_auth_gnome_keyring_unlock_prompt_func_t unlock_prompt_func =
> apr_hash_get(parameters,
> SVN_AUTH_PARAM_GNOME_KEYRING_UNLOCK_PROMPT_FUNC,
> APR_HASH_KEY_STRING);
> @@ -561,10 +561,10 @@ ssl_client_cert_pw_gnome_keyring_save_cr
> {
> if (unlock_prompt_func)
> {
> - SVN_ERR(unlock_prompt_func(&keyring_password,
> - default_keyring,
> - unlock_prompt_baton,
> - pool));
> + SVN_ERR((*unlock_prompt_func)(&keyring_password,
> + default_keyring,
> + unlock_prompt_baton,
> + pool));
> unlock_gnome_keyring(default_keyring, keyring_password,
> pool);
> }
>
> Modified: trunk/subversion/libsvn_subr/cmdline.c
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_subr/cmdline.c?pathrev=35314&r1=35313&r2=35314
> ==============================================================================
> --- trunk/subversion/libsvn_subr/cmdline.c Sun Jan 18 08:37:15 2009 (r35313)
> +++ trunk/subversion/libsvn_subr/cmdline.c Sun Jan 18 09:55:07 2009 (r35314)
> @@ -552,7 +552,7 @@ svn_cmdline_create_auth_baton(svn_auth_b
>
> #ifdef SVN_HAVE_GNOME_KEYRING
> svn_auth_set_parameter(*ab, SVN_AUTH_PARAM_GNOME_KEYRING_UNLOCK_PROMPT_FUNC,
> - &svn_cmdline_auth_unlock_prompt);
> + &svn_cmdline__auth_gnome_keyring_unlock_prompt);
> #endif /* SVN_HAVE_GNOME_KEYRING */
>
> return SVN_NO_ERROR;
>
> Modified: trunk/subversion/libsvn_subr/prompt.c
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_subr/prompt.c?pathrev=35314&r1=35313&r2=35314
> ==============================================================================
> --- trunk/subversion/libsvn_subr/prompt.c Sun Jan 18 08:37:15 2009 (r35313)
> +++ trunk/subversion/libsvn_subr/prompt.c Sun Jan 18 09:55:07 2009 (r35314)
> @@ -2,7 +2,7 @@
> * prompt.c -- ask the user for authentication information.
> *
> * ====================================================================
> - * Copyright (c) 2000-2006 CollabNet. All rights reserved.
> + * Copyright (c) 2000-2006, 2009 CollabNet. All rights reserved.
> *
> * This software is licensed as described in the file COPYING, which
> * you should have received as part of this distribution. The terms
> @@ -510,18 +510,18 @@ svn_cmdline_prompt_user(const char **res
> }
>
>
> -/* This implements 'svn_auth_unlock_prompt_func_t'. */
> +/* This implements 'svn_auth_gnome_keyring_unlock_prompt_func_t'. */
> svn_error_t *
> -svn_cmdline_auth_unlock_prompt(char **keyring_password,
> - const char *keyring_name,
> - void *baton,
> - apr_pool_t *pool)
> +svn_cmdline__auth_gnome_keyring_unlock_prompt(char **keyring_password,
> + const char *keyring_name,
> + void *baton,
> + apr_pool_t *pool)
> {
> const char *password;
> const char *pass_prompt;
> svn_cmdline_prompt_baton2_t *pb = baton;
>
> - pass_prompt = apr_psprintf(pool, _("Password for [%s] GNOME keyring: "),
> + pass_prompt = apr_psprintf(pool, _("Password for '%s' GNOME keyring: "),
> keyring_name);
> SVN_ERR(prompt(&password, pass_prompt, TRUE, pb, pool));
> *keyring_password = apr_pstrdup(pool, password);
>
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=495&dsMessageId=1033020
>

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1034914
Received on 2009-01-19 16:59:22 CET

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