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

RE: svn commit: r1529748 - in /subversion/trunk/subversion/svnserve: serve.c server.h

From: Bert Huijben <bert_at_qqmail.nl>
Date: Mon, 7 Oct 2013 13:15:30 +0200

> -----Original Message-----
> From: stefan2_at_apache.org [mailto:stefan2_at_apache.org]
> Sent: maandag 7 oktober 2013 07:02
> To: commits_at_subversion.apache.org
> Subject: svn commit: r1529748 - in /subversion/trunk/subversion/svnserve:
> serve.c server.h
>
> Author: stefan2
> Date: Mon Oct 7 05:02:00 2013
> New Revision: 1529748
>
> URL: http://svn.apache.org/r1529748
> Log:
> Make authz and password config file readers in svnserve only depend on
> repository information. Defer error logging to the caller level that
> will have a server baton.
>
> * subversion/svnserve/server.h
> (load_pwdb_config): remove from header
>
> * subversion/svnserve/serve.c
> (load_pwdb_config,
> load_authz_config): restrict parameters to repository-specific ones;
> defer error logging to parent
> (handle_config_error): new utility for deferred error logging
> (find_repos): update and simplify caller
> (serve): handle deferred error logging
>
> Modified:
> subversion/trunk/subversion/svnserve/serve.c
> subversion/trunk/subversion/svnserve/server.h
>
> Modified: subversion/trunk/subversion/svnserve/serve.c
> URL:
> http://svn.apache.org/viewvc/subversion/trunk/subversion/svnserve/serve
> .c?rev=1529748&r1=1529747&r2=1529748&view=diff
> ==========================================================
> ====================
> --- subversion/trunk/subversion/svnserve/serve.c (original)
> +++ subversion/trunk/subversion/svnserve/serve.c Mon Oct 7 05:02:00 2013
> @@ -283,16 +283,19 @@ log_authz_denied(const char *path,
> return log_write(b->log_file, line, strlen(line), pool);
> }
>
> -
> -svn_error_t *load_pwdb_config(server_baton_t *server,
> - svn_ra_svn_conn_t *conn,
> - apr_pool_t *pool)
> +/* If CFG specifies a path to the password DB, read that DB and store it
> + * in REPOSITORY->PWDB.
> + */
> +static svn_error_t *
> +load_pwdb_config(repository_t *repository,
> + svn_config_t *cfg,
> + apr_pool_t *pool)
> {
> const char *pwdb_path;
> svn_error_t *err;
> - repository_t *repository = server->repository;
>
> - svn_config_get(repository->cfg, &pwdb_path,
> SVN_CONFIG_SECTION_GENERAL,
> + svn_config_get(cfg, &pwdb_path,
> + SVN_CONFIG_SECTION_GENERAL,
> SVN_CONFIG_OPTION_PASSWORD_DB, NULL);
>
> repository->pwdb = NULL;
> @@ -305,8 +308,6 @@ svn_error_t *load_pwdb_config(server_bat
> FALSE, FALSE, pool);
> if (err)
> {
> - log_server_error(err, server, conn, pool);
> -
> /* Because it may be possible to read the pwdb file with some
> access methods and not others, ignore errors reading the pwdb
> file and just don't present password authentication as an
> @@ -319,11 +320,7 @@ svn_error_t *load_pwdb_config(server_bat
> if (err->apr_err != SVN_ERR_BAD_FILENAME
> && ! APR_STATUS_IS_EACCES(err->apr_err))
> {
> - /* Now that we've logged the error, clear it and return a
> - * nice, generic error to the user:
> - * http://subversion.tigris.org/issues/show_bug.cgi?id=2271 */
> - svn_error_clear(err);
> - return svn_error_create(SVN_ERR_AUTHN_FAILED, NULL, NULL);
> + return svn_error_create(SVN_ERR_AUTHN_FAILED, err, NULL);

I like the change for debugging, but this clearly re-introduces issue #2271 " svnserve expose the path to the password file if it is not found"

Is this message cleaned in a different place now?

        Bert
Received on 2013-10-07 13:16:11 CEST

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