Log Message: |
On the authzperf branch: Implement the notion of path rule ordering
by making svn_config_t iterate through sections in declaration order.
This is done using a simple linked list because we can't remove
sections but only add them.
Without support for wildcards or other patterns, the config struct
will only contain a single section for each path. With wildcards,
there may be more than one. All three of the follwing path rules
are equally applicable:
[/foo/*.doc]
* = r
[/foo/bar.*]
* = rw
[/foo/bar.doc]
jrandom =
To make conflicts managable, always pick the last path rule. That
means users should specify general rules first, followed by exceptions
and finally (and optionally) critical rules that deny certain access,
potentially globally.
Right now, this functionality is a mere preparation for wildcard
support (soon to be added).
* BRANCH-README
(TODO, DONE): One more down.
* subversion/libsvn_subr/config_impl.h
(svn_config_t): Add pointers to the first and last section.
* subversion/libsvn_subr/config.c
(cfg_section_t): Add link to next section in the list.
(svn_config_create2): Update constructor.
(for_each_option): Iterate following the section creation order
instead of the hash order.
(svn_config_addsection): Append new sections properly to the list.
(svn_config_enumerate_sections,
svn_config_enumerate_sections2): Iterate sections in creation order.
* subversion/libsvn_repos/authz.c
(access_t): Add SEQUENCE_NUMBER as criterion for later use.
(NO_SEQUENCE_NUMBER): Yet another "not a value" constant.
(process_path_rule_baton_t): Add counter such that all access_t
get a unique sequence number.
(process_path_rule): Assign and bump the sequence number.
(create_user_authz): Initialize sequence numbers and the numbering
process.
|