You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by cm...@apache.org on 2012/11/29 20:57:54 UTC
svn commit: r1415344 -
/subversion/trunk/tools/server-side/svnauthz-validate.c
Author: cmpilato
Date: Thu Nov 29 19:57:53 2012
New Revision: 1415344
URL: http://svn.apache.org/viewvc?rev=1415344&view=rev
Log:
* tools/server-side/svnauthz-validate.c
(main): Ensure the return of an error code of '2' for a pair of
general error situations, as promised by the --help text.
Patch by: danielsh
Modified:
subversion/trunk/tools/server-side/svnauthz-validate.c
Modified: subversion/trunk/tools/server-side/svnauthz-validate.c
URL: http://svn.apache.org/viewvc/subversion/trunk/tools/server-side/svnauthz-validate.c?rev=1415344&r1=1415343&r2=1415344&view=diff
==============================================================================
--- subversion/trunk/tools/server-side/svnauthz-validate.c (original)
+++ subversion/trunk/tools/server-side/svnauthz-validate.c Thu Nov 29 19:57:53 2012
@@ -88,10 +88,12 @@ main(int argc, const char **argv)
/* Repeat svn_cmdline__getopt_init() inline. */
apr_err = apr_getopt_init(&os, pool, argc, argv);
if (apr_err)
- return svn_cmdline_handle_exit_error(
- svn_error_wrap_apr(apr_err,
- ("Error initializing command line arguments")),
- pool, "svn-rep-sharing-stats: ");
+ {
+ err = svn_error_wrap_apr(apr_err,
+ ("Error initializing command line arguments"));
+ svn_handle_warning2(stderr, err, "svnauthz-validate: ");
+ return 2;
+ }
os->interleave = 1;
while (1)
@@ -131,8 +133,14 @@ main(int argc, const char **argv)
}
/* Grab AUTHZ_FILE from argv. */
- SVN_INT_ERR(svn_utf_cstring_to_utf8(&opts.authz_file, os->argv[os->ind],
- pool));
+ err = svn_utf_cstring_to_utf8(&opts.authz_file, os->argv[os->ind], pool);
+ if (err)
+ {
+ svn_handle_warning2(stderr, err, "svnauthz-validate: ");
+ svn_error_clear(err);
+ return 2;
+ }
+
opts.authz_file = svn_dirent_internal_style(opts.authz_file, pool);
/* Read the access file and validate it. */