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

Re: dont-save-plaintext-passwords-by-default branch done (2nd try)

From: Stefan Sperling <stsp_at_elego.de>
Date: Mon, 28 Apr 2008 14:54:53 +0200

On Sun, Apr 27, 2008 at 04:24:57PM -0700, David Glasser wrote:
> On Sun, Apr 27, 2008 at 2:50 PM, Stefan Sperling <stsp_at_elego.de> wrote:
> > On Sun, Apr 27, 2008 at 06:00:34PM +0200, Arfrever Frehtes Taifersar Arahesis wrote:
> > > $ svn cat https://svn.collab.net/repos/svn/branches/dont-save-plaintext-passwords-by-default/TODO.branch
> > > TODOS in this branch:
> >
> > Hey Arfrever,
> >
> > See http://subversion.tigris.org/servlets/ReadMsg?list=dev&&msgNo=137804
> > I'm just waiting for an OK by glasser.
>
> Sure, seems like it would be something useful for other
> implementors... though you could perhaps pass it as an argument to the
> callback instead.

Hmm. I don't know which is better. I guess this depends on whether
we really want to hide the configuration directory path from clients.

I think read-only access to the directory path isn't harmful, and
it helps clients to point users to the proper configuration file,
instead of taking a wild guess.

I don't know if this use case already exists in the wild, but I can
imagine that clients trying to be helpful may want to print the path.

But to be consistent, we may also want to provide
svn_config_get_registry_config_path() or something like that on win32,
i.e. expose the constant SVN_REGISTRY_USR_CONFIG_PATH.

> Did you ever figure out about the Windows registry thing (ie, the fact
> that in some setups, a non-file mechanism takes precedence)?

It looks like this should be handled correctly since the registry vs.
files thing is abstracted away in libsvn_subr/config.c:get_category_config(),
which is called by svn_config_get_config().

The read_all() routine called by get_category_config() reads from the
registry if applicable. Its docstring contains:

/* Read various configuration sources into *CFGP, in this order, with
 * later reads overriding the results of earlier ones:
 *
 * 1. SYS_REGISTRY_PATH (only on Win32, but ignored if NULL)
 *
 * 2. SYS_FILE_PATH (everywhere, but ignored if NULL)
 *
 * 3. USR_REGISTRY_PATH (only on Win32, but ignored if NULL)
 *
 * 4. USR_FILE_PATH (everywhere, but ignored if NULL)

On Windows, svn_config_get_user_config_path() will return whatever
svn_config__win_config_path() returns. This will never be a registry
key, but pointing the user to the file isn't wrong, because whatever
they specify in the file will override what's in the registry. The
file is the last item listed in read_all's docstring, so it takes
precedence.

People who prefer using the registry will hopefully be able to guess
that they can also configure the behaviour there, right? ;)

-- 
Stefan Sperling <stsp_at_elego.de>                    Software Monkey
 
German law requires the following banner :(
elego Software Solutions GmbH                            HRB 77719
Gustav-Meyer-Allee 25, Gebaeude 12        Tel:  +49 30 23 45 86 96 
13355 Berlin                              Fax:  +49 30 23 45 86 95
http://www.elego.de                               CEO: Olaf Wagner
 
Store password unencrypted (yes/no)? No

  • application/pgp-signature attachment: stored
Received on 2008-04-28 14:53:43 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.