[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: David Glasser <glasser_at_davidglasser.net>
Date: Mon, 28 Apr 2008 15:33:42 -0700

On Mon, Apr 28, 2008 at 5:54 AM, Stefan Sperling <stsp_at_elego.de> wrote:
> 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? ;)

Ah, cool. So maybe you could (with the proper ifdefs) add "or the
registry", but even without that, it'll be accurate. Sounds good.

--dave

-- 
David Glasser | glasser@davidglasser.net | http://www.davidglasser.net/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-04-29 00:33:55 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.