[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 #2242.

From: Senthil Kumaran S <senthil_at_collab.net>
Date: Thu, 26 Jun 2008 11:48:47 +0530

Daniel Shahaf wrote:
>> Can STR be NULL here? I prefer
>>
>> str = apr_hash_get(creds, SVN_AUTH__AUTHFILE_USERNAME_KEY,
>> APR_HASH_KEY_STRING);
>> if (str && strcmp(str->data, username) == 0)
>
> Actually, the docstring for svn_auth__password_get_t says:
>
> It might be obtained directly from CREDS, or from an external store,
> using REALMSTRING and USERNAME as keys.
>
> So don't we need compare the realms as well?

We need not compare the realms here. If you look at the structure of the files
which we store into the auth area, inside svn.simple we create one file per
realm, where the filename is an hashed value of the realm. When we query for a
password for a particular realm, we get the creds_hash as follows:

<snip>
       err = svn_config_read_auth_data(&creds_hash, SVN_AUTH_CRED_SIMPLE,
                                       realmstring, config_dir, pool);
</snip>

So we need not take the realm into account here.

-- 
Senthil Kumaran S
http://www.stylesen.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-06-26 08:20:06 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.