Log some svnserve errors (I'm sure we have a lot more we could log).
* subversion/svnserve/serve.c
(log_write): Add simple wrapper around svn_io_file_write().
(log_error):
- Move most of the old log_fs_warning logic to this new function,
which takes err, log_file, remote_host, user, and repos
directly, so it can be used from main(), too.
- Do nothing if err is NULL
- Log NULL repos as "-"
- Expand format to include the err debug info (file/line) when available.
- Use log_write().
(log_server_error): Add wrapper around log_error that gets most of
the arguments from server_baton_t and svn_ra_svn_conn_t
(error_create_and_log): Add helper function to create, log, and
return a new error.
(log_command): Rename from svnserve_log. Use log_write.
(SLOG, replay_one_revision): Use log_command.
(load_configs): Take server_baton_t and svn_ra_svn_conn_t arguments
in order to log errors when called from serve(). main() passes
NULL for them, in which case this still returns them, and main()
still exits non-zero. Return generic errors to the user instead
of leaking the passwd/authz file paths, but log the full error
(fixes svn issue 2271). Move below log functions.
(lookup_access): Take svn_ra_svn_conn_t argument and use it to log
authz_check_access errors before discarding (fixing an old TODO).
(must_have_access, add_lock_tokens, lock_many, unlock_many): Pass
conn along to lookup_access. Log the access denied error we
return to the user.
(unlock_paths): Take new conn argument to use in logging errors from
svn_repos_fs_unlock before discarding (fixing an old TODO).
(commit): Pass conn along to unlock_paths.
(find_repos): Take new conn argument to pass along to load_configs.
Log the access denied error we return to the user.
(fs_warning_func): Renamed from log_fs_warning and now just a simple
wrapper around log_server_error.
(serve): Log the access denied error we return to the user. Log
errors from find_repos.
* subversion/svnserve/server.h
(load_configs): Update declaration.
(log_error): Declare.
* subversion/svnserve/main.c
(main): Log errors from serve before discarding. Log fork(2) errors.
* subversion/tests/cmdline/authz_tests.py
(authz_validate): Adapt svnserve error messages.
git-svn-id: http://svn.collab.net/repos/svn/trunk@30827 612f8ebc-c883-4be0-9ee0-a4e9ef946e3a