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

[PATCH] Fix username_prompt_provider so the prompt callback will actually get called.

From: Ben Reser <ben_at_reser.org>
Date: 2004-01-01 07:25:54 CET

Currently the username prompt authentication provider attempts to look
up the current users uid and the username attached to that. If it
finds it (which it almost certainly always will except perhaps on a few
platforms) it uses that. As a result the prompt provider never gets

After discussing this on IRC with sussman we figured that it would be
appropriate to move the uid look up to the username_provider.

The following patch does just that. This doesn't require an API change.
In fact the current behavior doesn't even really appear to be
documented. Most clients will have both a username_provider and a
username_prompt_provider and as a result will not notice any difference.

Only clients that only use a username_provider or a
username_prompt_provider will notice a difference.

Additionally, it's worth noting that this fixes a problem in the perl
bindings where by default it only provides the *_providers and not the
*_prompt_providers. As a result commits to a local repository show with
no username.

So I really think this is a low risk change and probably makes this
behave more in the way people would expect.

Do not get the username of the current user in the prompt
provider. If we do get this then the prompt callback
will essentially be unreachable code.

* subversion/libsvn_client/username_providers.c
  (get_creds): Look for the current users username here.
  (prompt_for_username_creds): Do not lookup the current users username.

Ben Reser <ben@reser.org>
"Conscience is the inner voice which warns us somebody may be looking."
- H.L. Mencken

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Received on Thu Jan 1 07:26:29 2004

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