You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Ben Reser <be...@reser.org> on 2004/01/01 06:25:54 UTC

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

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
called.

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 <be...@reser.org>
http://ben.reser.org

"Conscience is the inner voice which warns us somebody may be looking."
- H.L. Mencken

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

Posted by Tobias Ringström <to...@ringstrom.mine.nu>.
Ben Reser wrote:
> So I really think this is a low risk change and probably makes this
> behave more in the way people would expect.

Agreed.  I've worked on your patch a bit, and I plan to commmit it 
tomorrow.  Thanks for your analysis and patch!

/Tobias


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