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

« back to all changes in this revision

Viewing changes to subversion/include/private/svn_ra_svn_private.h

  • 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:
43
43
                               svn_delta_shim_callbacks_t *shim_callbacks);
44
44
 
45
45
/**
 
46
 * Return the memory pool used to allocate @a conn.
 
47
 */
 
48
apr_pool_t *
 
49
svn_ra_svn__get_pool(svn_ra_svn_conn_t *conn);
 
50
 
 
51
/**
46
52
 * @defgroup ra_svn_deprecated ra_svn low-level functions
47
53
 * @{
48
54
 */
83
89
                       apr_pool_t *pool,
84
90
                       const char *word);
85
91
 
 
92
/** Write a boolean over the net.
 
93
 *
 
94
 * Writes will be buffered until the next read or flush.
 
95
 */
 
96
svn_error_t *
 
97
svn_ra_svn__write_boolean(svn_ra_svn_conn_t *conn,
 
98
                          apr_pool_t *pool,
 
99
                          svn_boolean_t value);
 
100
 
86
101
/** Write a list of properties over the net.  @a props is allowed to be NULL,
87
102
 * in which case an empty list will be written out.
88
103
 *
186
201
     w     const char **          Word
187
202
     b     svn_boolean_t *        Word ("true" or "false")
188
203
     B     apr_uint64_t *         Word ("true" or "false")
 
204
     3     svn_tristate_t *       Word ("true" or "false")
189
205
     l     apr_array_header_t **  List
190
206
     (                            Begin tuple
191
207
     )                            End tuple
196
212
 * the end of the specification.  So if @a fmt is "c?cc" and @a list
197
213
 * contains two elements, an error will result.
198
214
 *
199
 
 * 'B' is similar to 'b', but may be used in the optional tuple specification.
200
 
 * It returns TRUE, FALSE, or SVN_RA_SVN_UNSPECIFIED_NUMBER.
 
215
 * '3' is similar to 'b', but may be used in the optional tuple specification.
 
216
 * It returns #svn_tristate_true, #svn_tristate_false or #svn_tristate_unknown.
 
217
 *
 
218
 * 'B' is similar to '3', but it returns @c TRUE, @c FALSE, or
 
219
 * #SVN_RA_SVN_UNSPECIFIED_NUMBER.  'B' is deprecated; new code should
 
220
 * use '3' instead.
201
221
 *
202
222
 * If an optional part of a tuple contains no data, 'r' values will be
203
 
 * set to @c SVN_INVALID_REVNUM, 'n' and 'B' values will be set to
204
 
 * SVN_RA_SVN_UNSPECIFIED_NUMBER, and 's', 'c', 'w', and 'l' values
205
 
 * will be set to @c NULL.  'b' may not appear inside an optional
206
 
 * tuple specification; use 'B' instead.
 
223
 * set to @c SVN_INVALID_REVNUM; 'n' and 'B' values will be set to
 
224
 * #SVN_RA_SVN_UNSPECIFIED_NUMBER; 's', 'c', 'w', and 'l' values
 
225
 * will be set to @c NULL; and '3' values will be set to #svn_tristate_unknown
 
226
 * 'b' may not appear inside an optional tuple specification; use '3' instead.
207
227
 */
208
228
svn_error_t *
209
229
svn_ra_svn__parse_tuple(const apr_array_header_t *list,
236
256
                              apr_pool_t *pool,
237
257
                              const char *fmt, ...);
238
258
 
 
259
/** Check the receive buffer and socket of @a conn whether there is some
 
260
 * unprocessed incoming data without waiting for new data to come in.
 
261
 * If data is found, set @a *has_command to TRUE.  If the connection does
 
262
 * not contain any more data and has been closed, set @a *terminated to
 
263
 * TRUE.
 
264
 */
 
265
svn_error_t *
 
266
svn_ra_svn__has_command(svn_boolean_t *has_command,
 
267
                        svn_boolean_t *terminated,
 
268
                        svn_ra_svn_conn_t *conn,
 
269
                        apr_pool_t *pool);
 
270
 
 
271
/** Accept a single command from @a conn and handle them according
 
272
 * to @a cmd_hash.  Command handlers will be passed @a conn, @a pool,
 
273
 * the parameters of the command, and @a baton.  @a *terminate will be
 
274
 * set if either @a error_on_disconnect is FALSE and the connection got
 
275
 * closed, or if the command being handled has the "terminate" flag set
 
276
 * in the command table.
 
277
 */
 
278
svn_error_t *
 
279
svn_ra_svn__handle_command(svn_boolean_t *terminate,
 
280
                           apr_hash_t *cmd_hash,
 
281
                           void *baton,
 
282
                           svn_ra_svn_conn_t *conn,
 
283
                           svn_boolean_t error_on_disconnect,
 
284
                           apr_pool_t *pool);
 
285
 
239
286
/** Accept commands over the network and handle them according to @a
240
287
 * commands.  Command handlers will be passed @a conn, a subpool of @a
241
288
 * pool (cleared after each command is handled), the parameters of the
267
314
                               apr_pool_t *pool,
268
315
                               const char *fmt, ...);
269
316
 
270
 
/** Write an unsuccessful command response over the network. */
 
317
/** Write an unsuccessful command response over the network.
 
318
 *
 
319
 * @note This does not clear @a err. */
271
320
svn_error_t *
272
321
svn_ra_svn__write_cmd_failure(svn_ra_svn_conn_t *conn,
273
322
                              apr_pool_t *pool,
274
 
                              svn_error_t *err);
 
323
                              const svn_error_t *err);
275
324
 
276
325
/**
277
326
 * @}
563
612
/** Send a "change-rev-prop2" command over connection @a conn.
564
613
 * Use @a pool for allocations.
565
614
 *
566
 
 * @see #svn_ra_change_rev_prop2 for a description.
 
615
 * If @a dont_care is false then check that the old value matches
 
616
 * @a old_value. If @a dont_care is true then do not check the old
 
617
 * value; in this case @a old_value must be NULL.
 
618
 *
 
619
 * @see #svn_ra_change_rev_prop2 for the rest of the description.
567
620
 */
568
621
svn_error_t *
569
622
svn_ra_svn__write_cmd_change_rev_prop2(svn_ra_svn_conn_t *conn,
819
872
/**
820
873
 * @}
821
874
 */
 
875
 
 
876
/**
 
877
 * @defgroup svn_send_data sending data structures over ra_svn
 
878
 * @{
 
879
 */
 
880
 
 
881
/** Send a changed path (as part of transmitting a log entry) over connection
 
882
 * @a conn.  Use @a pool for allocations.
 
883
 *
 
884
 * @see svn_log_changed_path2_t for a description of the other parameters.
 
885
 */
 
886
svn_error_t *
 
887
svn_ra_svn__write_data_log_changed_path(svn_ra_svn_conn_t *conn,
 
888
                                        apr_pool_t *pool,
 
889
                                        const char *path,
 
890
                                        char action,
 
891
                                        const char *copyfrom_path,
 
892
                                        svn_revnum_t copyfrom_rev,
 
893
                                        svn_node_kind_t node_kind,
 
894
                                        svn_boolean_t text_modified,
 
895
                                        svn_boolean_t props_modified);
 
896
 
 
897
/** Send a the details of a log entry (as part of transmitting a log entry
 
898
 * and without revprops and changed paths) over connection @a conn.
 
899
 * Use @a pool for allocations.
 
900
 *
 
901
 * @a author, @a date and @a message have been extracted and removed from
 
902
 * the revprops to follow.  @a has_children is taken directly from the
 
903
 * #svn_log_entry_t struct.  @a revision is too, except when it equals
 
904
 * #SVN_INVALID_REVNUM.  In that case, @a revision must be 0 and
 
905
 * @a invalid_revnum be set to TRUE.  @a revprop_count is the number of
 
906
 * revprops that will follow in the revprops list.
 
907
 */
 
908
svn_error_t *
 
909
svn_ra_svn__write_data_log_entry(svn_ra_svn_conn_t *conn,
 
910
                                 apr_pool_t *pool,
 
911
                                 svn_revnum_t revision,
 
912
                                 const svn_string_t *author,
 
913
                                 const svn_string_t *date,
 
914
                                 const svn_string_t *message,
 
915
                                 svn_boolean_t has_children,
 
916
                                 svn_boolean_t invalid_revnum,
 
917
                                 unsigned revprop_count);
 
918
 
 
919
/**
 
920
 * @}
 
921
 */
 
922
 
 
923
/**
 
924
 * @defgroup svn_read_data reading data structures from ra_svn
 
925
 * @{
 
926
 */
 
927
 
 
928
/** Take the data tuple ITEMS received over ra_svn and convert it to the
 
929
 * a changed path (as part of receiving a log entry).
 
930
 *
 
931
 * @see svn_log_changed_path2_t for a description of the output parameters.
 
932
 */
 
933
svn_error_t *
 
934
svn_ra_svn__read_data_log_changed_entry(const apr_array_header_t *items,
 
935
                                        svn_string_t **cpath,
 
936
                                        const char **action,
 
937
                                        const char **copy_path,
 
938
                                        svn_revnum_t *copy_rev,
 
939
                                        const char **kind_str,
 
940
                                        apr_uint64_t *text_mods,
 
941
                                        apr_uint64_t *prop_mods);
 
942
/**
 
943
 * @}
 
944
 */
 
945
 
822
946
#ifdef __cplusplus
823
947
}
824
948
#endif /* __cplusplus */