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

Re: svn commit: r31428 - in trunk/subversion: include libsvn_subr

From: Arfrever Frehtes Taifersar Arahesis <arfrever.fta_at_gmail.com>
Date: Thu, 29 May 2008 14:40:33 +0200

2008-05-26 18:29:18 David Glasser napisaƂ(a):
> On Sat, May 24, 2008 at 1:22 PM, <arfrever_at_tigris.org> wrote:
> > Author: arfrever
> > Date: Sat May 24 13:22:10 2008
> > New Revision: 31428
> >
> > Log:
> > Implement the 'password-stores' config option.
> >
> > * subversion/include/svn_config.h
> > (SVN_CONFIG_OPTION_PASSWORD_STORES): Define.
> >
> > * subversion/libsvn_subr/config_file.c
> > (svn_config_ensure): Update the default 'config' file.
> >
> > * subversion/libsvn_subr/cmdline.c
> > (svn_cmdline_setup_auth_baton): Use the 'password-stores' option
> > to determine order of dynamically loaded auth simple providers.
> >
> > Modified:
> > trunk/subversion/include/svn_config.h
> > trunk/subversion/libsvn_subr/cmdline.c
> > trunk/subversion/libsvn_subr/config_file.c
> >
> > Modified: trunk/subversion/include/svn_config.h
> > URL: http://svn.collab.net/viewvc/svn/trunk/subversion/include/svn_config.h?pathrev=31428&r1=31427&r2=31428
> > ==============================================================================
> > --- trunk/subversion/include/svn_config.h Sat May 24 10:07:45 2008 (r31427)
> > +++ trunk/subversion/include/svn_config.h Sat May 24 13:22:10 2008 (r31428)
> > @@ -80,8 +80,9 @@ typedef struct svn_config_t svn_config_t
> >
> > #define SVN_CONFIG_CATEGORY_CONFIG "config"
> > #define SVN_CONFIG_SECTION_AUTH "auth"
> > -/* The "auth" section has been deprecated.
> > - * Its options have been moved to SVN_CONFIG_CATEGORY_SERVERS. */
> > +#define SVN_CONFIG_OPTION_PASSWORD_STORES "password-stores"
> > +/* The majority of options of the "auth" section
> > + * has been moved to SVN_CONFIG_CATEGORY_SERVERS. */
> > #define SVN_CONFIG_SECTION_HELPERS "helpers"
> > #define SVN_CONFIG_OPTION_EDITOR_CMD "editor-cmd"
> > #define SVN_CONFIG_OPTION_DIFF_CMD "diff-cmd"
> >
> > Modified: trunk/subversion/libsvn_subr/cmdline.c
> > URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_subr/cmdline.c?pathrev=31428&r1=31427&r2=31428
> > ==============================================================================
> > --- trunk/subversion/libsvn_subr/cmdline.c Sat May 24 10:07:45 2008 (r31427)
> > +++ trunk/subversion/libsvn_subr/cmdline.c Sat May 24 13:22:10 2008 (r31428)
> > @@ -435,17 +435,45 @@ svn_cmdline_setup_auth_baton(svn_auth_ba
> > svn_auth_get_keychain_simple_provider(&provider, pool);
> > APR_ARRAY_PUSH(providers, svn_auth_provider_object_t *) = provider;
> > #endif
> > +#if defined(SVN_HAVE_GNOME_KEYRING) || defined(SVN_HAVE_KWALLET)
> > + const char *password_stores_config_option;
> > + svn_config_get(cfg,
> > + &password_stores_config_option,
> > + SVN_CONFIG_SECTION_AUTH,
> > + SVN_CONFIG_OPTION_PASSWORD_STORES,
> > + "gnome-keyring,kwallet");
> > +
> > + apr_array_header_t *password_stores
> > + = svn_cstring_split(password_stores_config_option, " ,", TRUE, pool);
> > +
> > + int i;
> > + for (i = 0; i < password_stores->nelts; i++)
> > + {
> > + const char *password_store = APR_ARRAY_IDX(password_stores, i,
> > + const char *);
> > #ifdef SVN_HAVE_GNOME_KEYRING
> > - if (get_auth_simple_provider(&provider, "gnome_keyring", pool))
> > - {
> > - APR_ARRAY_PUSH(providers, svn_auth_provider_object_t *) = provider;
> > - }
> > + if (apr_strnatcmp(password_store, "gnome-keyring") == 0)
> > + {
> > + if (get_auth_simple_provider(&provider, "gnome_keyring", pool))
> > + {
> > + APR_ARRAY_PUSH(providers, svn_auth_provider_object_t *) = provider;
> > + }
> > + continue;
> > + }
> > #endif
> > #ifdef SVN_HAVE_KWALLET
> > - if (get_auth_simple_provider(&provider, "kwallet", pool))
> > - {
> > - APR_ARRAY_PUSH(providers, svn_auth_provider_object_t *) = provider;
> > + if (apr_strnatcmp(password_store, "kwallet") == 0)
> > + {
> > + if (get_auth_simple_provider(&provider, "kwallet", pool))
> > + {
> > + APR_ARRAY_PUSH(providers, svn_auth_provider_object_t *) = provider;
> > + }
> > + continue;
> > + }
> > +#endif
> > + /* TODO: Error. */
> > }
> > +// SVN_ERR(add_dynamically_loaded_auth_simple_providers_to_array(&providers, cfg, pool));
> > #endif
> > if (non_interactive == FALSE)
> > {
> >
> > Modified: trunk/subversion/libsvn_subr/config_file.c
> > URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_subr/config_file.c?pathrev=31428&r1=31427&r2=31428
> > ==============================================================================
> > --- trunk/subversion/libsvn_subr/config_file.c Sat May 24 10:07:45 2008 (r31427)
> > +++ trunk/subversion/libsvn_subr/config_file.c Sat May 24 13:22:10 2008 (r31428)
> > @@ -902,8 +902,10 @@ svn_config_ensure(const char *config_dir
> > "" NL
> > "### Section for authentication and authorization customizations." NL
> > "[auth]" NL
> > + "### Password stores used by Subversion:" NL
> > + "# password-stores = gnome-keyring,kwallet" NL
>
> This needs better documentation. For example, you should probably
> explain that it *only* covers these two libraries (and not Keychain,
> Windows thingy, etc...)

I prefer to make it cover also Keychain and Windows simple provider.
What name should I use for the value corresponding to Windows simple provider?
"wincrypt"? "windows-cryptoapi"?

-- 
Arfrever Frehtes Taifersar Arahesis

Received on 2008-05-29 14:44:55 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.