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

Re: [PATCH] optionally allow username to be passed with svnserve ANONYMOUS auth

From: Greg Hudson <ghudson_at_MIT.EDU>
Date: 2003-09-14 23:21:07 CEST

On Sun, 2003-09-14 at 15:03, Garrett Rooney wrote:
> Any comments?

I have one correctness comment and some style nits:

> + if (!user)
> + {
> + svn_auth_iterstate_t *iterstate;

ra_svn code prefers to group all variable declarations at the beginning
of functions.

> SVN_ERR(svn_ra_svn_write_tuple(conn, pool, "nw(c)()", (apr_uint64_t) 1,
> - "ANONYMOUS", ""));
> + "ANONYMOUS", user));

If user is NULL, this will dump core. Send "" if user is NULL (since
ANONYMOUS demands a mechanism argument).

> + if (believe_username && mecharg && mecharg[0])
> + {
> + user = mecharg;
> + }

ra_svn code prefers not to put braces around single-statement if
bodies. It also prefers to use *mecharg instead of mecharg[0] to test
for the non-emptiness of a string.

(Now that I'm thinking about this, I think if mecharg is NULL, we should
issue a challenge for a token, rather than behave as if the mecharg were
the empty string. But there's no need to worry about that just now.)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Sep 14 23:22:04 2003

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.