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

Re: [PATCH] Fix issue #2324

From: Senthil Kumaran S <senthil_at_collab.net>
Date: Thu, 07 Aug 2008 14:53:28 +0530

Hash: SHA1

Hi Mike,

Thanks for your review, my comments inline.

C. Michael Pilato wrote:
> I have a question, though -- should the 'servers' file "win" over the
> auth cache in terms of priority? Seems to me that the auth cache --
> which typically is populated with known-good credentials, should be
> given precedence over the 'servers' file. That would allow me to put
> "cmpilato" in the [global] section of my servers file and yet not have
> that contradict creds in the auth cache which use a different username.
> In fact, I guess I kinda expected to see code something like this:
> creds = check-auth-cache
> if (! creds)
> creds = check-servers-file
> if (! creds)
> creds = apr_getusername()
> With such an ordering, the servers file effectively becomes just a way
> to override the username assumption.

This sounds like a good ordering to me. I ve updated the patch accordingly and
attached along with this email.

> But maybe this discussion was already played out previously and I missed
> it?

No we didnt had a discussion about this. We had discussions whether to have
username option in config file or the servers file.

Fix issue #2324: Disable username assumption.

Rather than disabling the username assumption, this takes the
different approach of consulting the runtime configuration for a
default username before falling back to other methods (which include
using the current user id's name).

The order in which default username is determined is as follows:
        1. username supplied in command line
        2. username in the auth cache
        3. username given in servers file
        4. current user id's name

* subversion/include/svn_config.h
  (SVN_CONFIG_OPTION_USERNAME): New config option.

* subversion/libsvn_subr/config_file.c
  (svn_config_ensure): Add text about the new config file parameter 'username'.

* subversion/libsvn_subr/simple_providers.c
  (simple_first_creds_helper, prompt_for_simple_creds): Try to find a
   username in the 'servers' file.

Patch by: stylesen
Suggested by: glasser
Review by: cmpilato

- --
Senthil Kumaran S
Version: GnuPG v1.4.6 (GNU/Linux)


To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org

Received on 2008-08-07 11:25:22 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.