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

Fwd: RFE for config file parser

From: Pete Gonzalez <pgonzalez_at_bluel.com>
Date: 2004-01-15 02:23:53 CET

[This message was incorrectly posted to the dev@tortoisesvn.tigris.org
mailing list.]

----------------Forwarded Message------------------
Date: Thu, 08 Jan 2004 03:02:32 -0500
To: dev@tortoisesvn.tigris.org
From: Pete Gonzalez <pgonzalez@bluel.com>
Subject: RFE for config file parser

I just spent over an hour trying to get password authentication
working. The problem ended up being a stupid mistake (by me) that
was hidden by the autodeclared-variables model used with the
subversion config files.

Basically, I edited this:

># [general]
>### These options control access to the repository for unauthenticated
>### and authenticated users. Valid values are "write", "read",
>### and "none". The sample settings below are the defaults.
># anon-access = read
># auth-access = write
>### This option controls the location of the password database. This
>### path may be relative to the conf directory. There is no default.
>### The format of the password database is:
>### [users]
>### USERNAME = PASSWORD
># password-db = passwd

to produce this:

>[general]
>### These options control access to the repository for unauthenticated
>### and authenticated users. Valid values are "write", "read",
>### and "none". The sample settings below are the defaults.
># anon-access = read
># auth-access = write
>anon-access = none
>### This option controls the location of the password database. This
>### path may be relative to the conf directory. There is no default.
>### The format of the password database is:
>[users]
>### USERNAME = PASSWORD
>
>password-db = password.conf

The mistake is that, in my haste, I didn't realize that "[users]" is
prefixed by "###" and not "#", which is supposed to communicate that
it goes in the other file. Thus, my "password-db" variable
ended up in an (autodeclared) "users" section instead of the "general"
section where it belongs.

The result is that the server never even prompts the client for
a password, since from its perspective there are no valid passwords.
This makes perfect sense from an implementation standpoint, but
from my perspective as a novice user, the behavior was really hard
to interpret, particularly since svnserve doesn't have a traditional
"-log-copious-debug-info" switch. In the end, I figured it out by
using the Linux "strace" tool to dump out all the system calls,
from which I realized that password.conf was not even being opened.

I understand why the config file format is the way it is. What
I'm wondering is how hard it would be to add some (possibly optional)
warnings for unrecognized config options. Right now we only have
a few variables, but as the list grows, the probability of other
(less dumb) people encountering this problem will only increase.

Cheers,
-Pete

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

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Jan 15 02:25:00 2004

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.