summaryrefslogtreecommitdiff
path: root/subversion/tests/libsvn_repos/authz-test.c
diff options
context:
space:
mode:
Diffstat (limited to 'subversion/tests/libsvn_repos/authz-test.c')
-rw-r--r--subversion/tests/libsvn_repos/authz-test.c39
1 files changed, 37 insertions, 2 deletions
diff --git a/subversion/tests/libsvn_repos/authz-test.c b/subversion/tests/libsvn_repos/authz-test.c
index 6ee2448..1f6a4dd 100644
--- a/subversion/tests/libsvn_repos/authz-test.c
+++ b/subversion/tests/libsvn_repos/authz-test.c
@@ -277,9 +277,9 @@ test_authz_parse(const svn_test_opts_t *opts,
printf("[users]\n");
if (authz->has_anon_rights)
- print_user_rights(NULL, NULL, 0, &authz->anon_rights, pool);
+ SVN_ERR(print_user_rights(NULL, NULL, 0, &authz->anon_rights, pool));
if (authz->has_authn_rights)
- print_user_rights(NULL, NULL, 0, &authz->authn_rights, pool);
+ SVN_ERR(print_user_rights(NULL, NULL, 0, &authz->authn_rights, pool));
SVN_ERR(svn_iter_apr_hash(NULL, authz->user_rights,
print_user_rights, NULL, pool));
printf("\n\n");
@@ -478,6 +478,39 @@ issue_4741_groups(apr_pool_t *pool)
return SVN_NO_ERROR;
}
+static svn_error_t *
+reposful_reposless_stanzas_inherit(apr_pool_t *pool)
+{
+ const char rules[] =
+ "[groups]" NL
+ "company = user1, user2, user3" NL
+ "customer = customer1, customer2" NL
+ "" NL
+ "# company can read-write on everything" NL
+ "[/]" NL
+ "@company = rw" NL
+ "" NL
+ "[project1:/]" NL
+ "@customer = r" NL
+ "" NL
+ "[project2:/]" NL;
+
+ svn_stringbuf_t *buf = svn_stringbuf_create(rules, pool);
+ svn_stream_t *stream = svn_stream_from_stringbuf(buf, pool);
+ svn_authz_t *authz;
+ svn_boolean_t access_granted;
+
+ SVN_ERR(svn_repos_authz_parse(&authz, stream, NULL, pool));
+
+ SVN_ERR(svn_repos_authz_check_access(authz, "project1", "/foo", "user1",
+ svn_authz_write | svn_authz_recursive,
+ &access_granted,
+ pool));
+ SVN_TEST_ASSERT(access_granted == TRUE);
+
+ return SVN_NO_ERROR;
+}
+
static int max_threads = 4;
static struct svn_test_descriptor_t test_funcs[] =
@@ -489,6 +522,8 @@ static struct svn_test_descriptor_t test_funcs[] =
"test svn_authz__get_global_rights"),
SVN_TEST_PASS2(issue_4741_groups,
"issue 4741 groups"),
+ SVN_TEST_XFAIL2(reposful_reposless_stanzas_inherit,
+ "[foo:/] inherits [/]"),
SVN_TEST_NULL
};