~ubuntu-branches/debian/sid/subversion/sid

« back to all changes in this revision

Viewing changes to subversion/libsvn_delta/debug_editor.c

  • Committer: Package Import Robot
  • Author(s): James McCoy
  • Date: 2015-08-07 21:32:47 UTC
  • mfrom: (0.2.15) (4.1.7 experimental)
  • Revision ID: package-import@ubuntu.com-20150807213247-ozyewtmgsr6tkewl
Tags: 1.9.0-1
* Upload to unstable
* New upstream release.
  + Security fixes
    - CVE-2015-3184: Mixed anonymous/authenticated path-based authz with
      httpd 2.4
    - CVE-2015-3187: svn_repos_trace_node_locations() reveals paths hidden
      by authz
* Add >= 2.7 requirement for python-all-dev Build-Depends, needed to run
  tests.
* Remove Build-Conflicts against ruby-test-unit.  (Closes: #791844)
* Remove patches/apache_module_dependency in favor of expressing the
  dependencies in authz_svn.load/dav_svn.load.
* Build-Depend on apache2-dev (>= 2.4.16) to ensure ap_some_authn_required()
  is available when building mod_authz_svn and Depend on apache2-bin (>=
  2.4.16) for runtime support.

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
  int indent_level;
34
34
 
35
35
  svn_stream_t *out;
 
36
  const char *prefix;
36
37
};
37
38
 
38
39
struct dir_baton
52
53
{
53
54
  int i;
54
55
 
55
 
  /* This is DBG_FLAG from ../libsvn_subr/debug.c */
56
 
  SVN_ERR(svn_stream_puts(eb->out, "DBG:"));
 
56
  SVN_ERR(svn_stream_puts(eb->out, eb->prefix));
57
57
  for (i = 0; i < eb->indent_level; ++i)
58
58
    SVN_ERR(svn_stream_puts(eb->out, " "));
59
59
 
346
346
  struct edit_baton *eb = fb->edit_baton;
347
347
 
348
348
  SVN_ERR(write_indent(eb, pool));
349
 
  SVN_ERR(svn_stream_printf(eb->out, pool, "change_file_prop : %s\n",
350
 
                            name));
 
349
  SVN_ERR(svn_stream_printf(eb->out, pool, "change_file_prop : %s -> %s\n",
 
350
                            name, value ? value->data : "<deleted>"));
351
351
 
352
352
  SVN_ERR(eb->wrapped_editor->change_file_prop(fb->wrapped_file_baton,
353
353
                                               name,
367
367
  struct edit_baton *eb = db->edit_baton;
368
368
 
369
369
  SVN_ERR(write_indent(eb, pool));
370
 
  SVN_ERR(svn_stream_printf(eb->out, pool, "change_dir_prop : %s\n", name));
 
370
  SVN_ERR(svn_stream_printf(eb->out, pool, "change_dir_prop : %s -> %s\n",
 
371
                            name, value ? value->data : "<deleted>"));
371
372
 
372
373
  SVN_ERR(eb->wrapped_editor->change_dir_prop(db->wrapped_dir_baton,
373
374
                                              name,
391
392
  return SVN_NO_ERROR;
392
393
}
393
394
 
 
395
static svn_error_t *
 
396
abort_edit(void *edit_baton,
 
397
           apr_pool_t *pool)
 
398
{
 
399
  struct edit_baton *eb = edit_baton;
 
400
 
 
401
  SVN_ERR(write_indent(eb, pool));
 
402
  SVN_ERR(svn_stream_printf(eb->out, pool, "abort_edit\n"));
 
403
 
 
404
  SVN_ERR(eb->wrapped_editor->abort_edit(eb->wrapped_edit_baton, pool));
 
405
 
 
406
  return SVN_NO_ERROR;
 
407
}
 
408
 
394
409
svn_error_t *
395
410
svn_delta__get_debug_editor(const svn_delta_editor_t **editor,
396
411
                            void **edit_baton,
397
412
                            const svn_delta_editor_t *wrapped_editor,
398
413
                            void *wrapped_edit_baton,
 
414
                            const char *prefix,
399
415
                            apr_pool_t *pool)
400
416
{
401
 
  svn_delta_editor_t *tree_editor = svn_delta_default_editor(pool);
 
417
  svn_delta_editor_t *tree_editor = apr_palloc(pool, sizeof(*tree_editor));
402
418
  struct edit_baton *eb = apr_palloc(pool, sizeof(*eb));
403
419
  apr_file_t *errfp;
404
420
  svn_stream_t *out;
405
421
 
406
 
  apr_status_t apr_err = apr_file_open_stderr(&errfp, pool);
 
422
  apr_status_t apr_err = apr_file_open_stdout(&errfp, pool);
407
423
  if (apr_err)
408
424
    return svn_error_wrap_apr(apr_err, "Problem opening stderr");
409
425
 
424
440
  tree_editor->close_file = close_file;
425
441
  tree_editor->absent_file = absent_file;
426
442
  tree_editor->close_edit = close_edit;
 
443
  tree_editor->abort_edit = abort_edit;
427
444
 
428
445
  eb->wrapped_editor = wrapped_editor;
429
446
  eb->wrapped_edit_baton = wrapped_edit_baton;
430
447
  eb->out = out;
431
448
  eb->indent_level = 0;
 
449
  /* This is DBG_FLAG from ../libsvn_subr/debug.c */
 
450
  eb->prefix = apr_pstrcat(pool, "DBG: ", prefix, SVN_VA_NULL);
432
451
 
433
452
  *editor = tree_editor;
434
453
  *edit_baton = eb;