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

Re: svn commit: r34221 - in trunk/subversion: include include/private libsvn_subr svn svnsync

From: Arfrever Frehtes Taifersar Arahesis <arfrever.fta_at_gmail.com>
Date: Sun, 16 Nov 2008 20:48:01 +0100

2008-11-16 15:32:08 Bert Huijben napisaƂ(a):
>
> > -----Original Message-----
> > From: arfrever_at_tigris.org [mailto:arfrever_at_tigris.org]
> > Sent: Sunday, November 16, 2008 3:20 PM
> > To: svn_at_subversion.tigris.org
> > Subject: svn commit: r34221 - in trunk/subversion: include
> > include/private libsvn_subr svn svnsync
> >
> > Author: arfrever
> > Date: Sun Nov 16 06:19:54 2008
> > New Revision: 34221
> >
> > Log:
> > Implement termination of authentication providers.
> >
> > * subversion/include/svn_auth.h
> > (svn_auth_provider_t.terminate_provider): New function which
> > terminates
> > authentication provider.
> >
> > * subversion/include/svn_cmdline.h
> > (svn_cmdline_terminate_auth_baton): New function which terminates all
> > authentication providers in authentication baton, which have non-
> > NULL
> > terminate_provider() function.
> >
> > * subversion/libsvn_subr/cmdline.c
> > (provider_set_t): New structure.
> > (svn_cmdline_terminate_auth_baton): New function which terminates all
> > authentication providers in authentication baton, which have non-
> > NULL
> > terminate_provider() function.
> >
> > * subversion/libsvn_subr/auth.c
> > (svn_auth_baton_t): Move from here ...
> > * subversion/include/private/svn_auth_private.h
> > (svn_auth_baton_t): ... to here.
> >
> > * subversion/svn/main.c
> > (main): Call svn_cmdline_terminate_auth_baton().
> >
> > * subversion/svnsync/main.c
> > (main): Call svn_cmdline_terminate_auth_baton().
> >
> > Modified:
> > trunk/subversion/include/private/svn_auth_private.h
> > trunk/subversion/include/svn_auth.h
> > trunk/subversion/include/svn_cmdline.h
> > trunk/subversion/libsvn_subr/auth.c
> > trunk/subversion/libsvn_subr/cmdline.c
> > trunk/subversion/svn/main.c
> > trunk/subversion/svnsync/main.c
> >
> > Modified: trunk/subversion/include/private/svn_auth_private.h
> > URL:
> > http://svn.collab.net/viewvc/svn/trunk/subversion/include/private/svn_a
> > uth_private.h?pathrev=34221&r1=34220&r2=34221
> > =======================================================================
> > =======
> > --- trunk/subversion/include/private/svn_auth_private.h Sun Nov 16
> > 04:33:16 2008 (r34220)
> > +++ trunk/subversion/include/private/svn_auth_private.h Sun Nov 16
> > 06:19:54 2008 (r34221)
> > @@ -36,6 +36,24 @@ extern "C" {
> > #define SVN_AUTH__KWALLET_PASSWORD_TYPE "kwallet"
> > #define SVN_AUTH__GNOME_KEYRING_PASSWORD_TYPE "gnome-keyring"
> >
> > +
> > +/* The main auth baton. */
> > +struct svn_auth_baton_t
> > +{
> > + /* a collection of tables. maps cred_kind -> provider_set */
> > + apr_hash_t *tables;
> > +
> > + /* the pool I'm allocated in. */
> > + apr_pool_t *pool;
> > +
> > + /* run-time parameters needed by providers. */
> > + apr_hash_t *parameters;
> > +
> > + /* run-time credentials cache. */
> > + apr_hash_t *creds_cache;
> > +};
> > +
> > +
> > /* A function that stores in *PASSWORD (potentially after decrypting
> > it)
> > the user's password. It might be obtained directly from CREDS, or
> > from an external store, using REALMSTRING and USERNAME as keys.
> >
> > Modified: trunk/subversion/include/svn_auth.h
> > URL:
> > http://svn.collab.net/viewvc/svn/trunk/subversion/include/svn_auth.h?pa
> > threv=34221&r1=34220&r2=34221
> > =======================================================================
> > =======
> > --- trunk/subversion/include/svn_auth.h Sun Nov 16 04:33:16 2008
> > (r34220)
> > +++ trunk/subversion/include/svn_auth.h Sun Nov 16 06:19:54 2008
> > (r34221)
> > @@ -142,6 +142,16 @@ typedef struct svn_auth_provider_t
> > const char *realmstring,
> > apr_pool_t *pool);
> >
> > + /** Terminate authentication provider.
> > + *
> > + * Terminate authentication provider. @a parameters contains any
> > + * run-time data the provider may need. If the provider doesn't
> > require
> > + * any termination, then this function pointer should simply be
> > NULL.
> > + *
> > + * @since New in 1.6.
> > + */
> > + svn_error_t * (*terminate_provider)(apr_hash_t *parameters,
> > + apr_pool_t *pool);
> > } svn_auth_provider_t;
>
> I don't think extending this structure is permitted under our ABI compatibility as there is no constructor for this type to allow adding fields.
>
> Maybe it is possible to handle termination in an apr pool cleanup handler for the kwallet provider?
>
> Further I don't think we can force all clients to start calling svn_cmdline_setup_auth_baton and svn_cmdline_terminate_auth_baton in 1.6, so perhaps there should be an equivalent function on the svn_auth_* level.

Fixed in r34229 and r34231.

-- 
Arfrever Frehtes Taifersar Arahesis

Received on 2008-11-16 20:51:49 CET

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.