Gunnar Thielebein | 21 Aug 11:31

saving auth credentials

Hi Phi,

For our convenience I moved this topic to dev.

I digged a little in svn hacking and when looking the functions 
svn_config_get_config and preparing auth_baton it seems all correct to 
me when comparing with e.g. svn client.

 From my gross understanding is that  dir ~/.subversion is already taken 
for credentials. There is only a problem in creating the initial 
directory structure if its missing and saving the auth file with the 
credentials. This should be done automagically via svn_cmd_setup_auth_baton.

When you say  try a meaningful cfg value, what do you mean with that?
I can't find another way getting cfg_hash. Could you shed some light on it?

Regards,
Gunnar
Philipp Marek | 21 Aug 17:53

Re: saving auth credentials

Hello Gunnar!

On Thursday 21 August 2008 Gunnar Thielebein wrote:
> For our convenience I moved this topic to dev.
>
> I digged a little in svn hacking and when looking the functions
> svn_config_get_config and preparing auth_baton it seems all correct to
> me when comparing with e.g. svn client.
>
>  From my gross understanding is that  dir ~/.subversion is already taken
> for credentials. There is only a problem in creating the initial
> directory structure if its missing and saving the auth file with the
> credentials. This should be done automagically via
> svn_cmd_setup_auth_baton.
>
> When you say  try a meaningful cfg value, what do you mean with that?
> I can't find another way getting cfg_hash. Could you shed some light on it?
When you look at the subversion sources, you see in subversion/svn/main.c:1936 
the call svn_cmdline_set_up_auth_baton() use opt_state.config_dir. This gets 
set by svn_config_ensure() some 400 lines above - which has a scary comment 
there.

In the FSVS sources there's racallback.c - which has the call to 
svn_cmdline_setup_auth_baton() in it.
This call gets a config directory (currently only NULL), and a "svn_config_t 
*cfg" - which is something different from the "apr_hash_t *cfg" that 
svn_ra_open() wants (in url.c). The config hash already gets fetched by 
svn_config_get_config(), like svn does - but again with a config directory as 
parameter.

(Continue reading)


Gmane