|
|
b2d430 |
From f3be4b46d39c1a0106b60d561bbdeee4c80961aa Mon Sep 17 00:00:00 2001
|
|
|
b2d430 |
From: Sumit Bose <sbose@redhat.com>
|
|
|
b2d430 |
Date: Fri, 1 Jul 2016 12:54:39 +0200
|
|
|
b2d430 |
Subject: [PATCH 24/27] sysdb: make subdomain calls aware of upn_suffixes
|
|
|
b2d430 |
|
|
|
b2d430 |
sysdb_subdomain_store() and sysdb_update_subdomains() can now update
|
|
|
b2d430 |
upn_suffixes as well.
|
|
|
b2d430 |
|
|
|
b2d430 |
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
|
|
|
b2d430 |
(cherry picked from commit 20348a30feb4be619b3b691c24c9be8131507c46)
|
|
|
b2d430 |
---
|
|
|
b2d430 |
src/confdb/confdb.h | 2 +-
|
|
|
b2d430 |
src/db/sysdb.h | 3 +-
|
|
|
b2d430 |
src/db/sysdb_subdomains.c | 56 +++++++++++++++++++++++++--
|
|
|
b2d430 |
src/providers/ad/ad_subdomains.c | 2 +-
|
|
|
b2d430 |
src/providers/ipa/ipa_subdomains.c | 9 ++++-
|
|
|
b2d430 |
src/tests/cmocka/test_ipa_subdomains_server.c | 4 +-
|
|
|
b2d430 |
src/tests/cmocka/test_nss_srv.c | 2 +-
|
|
|
b2d430 |
src/tests/cmocka/test_sysdb_subdomains.c | 28 +++++++-------
|
|
|
b2d430 |
src/tests/sysdb-tests.c | 6 +--
|
|
|
b2d430 |
9 files changed, 85 insertions(+), 27 deletions(-)
|
|
|
b2d430 |
|
|
|
b2d430 |
diff --git a/src/confdb/confdb.h b/src/confdb/confdb.h
|
|
|
b2d430 |
index 0265ccac5ee2e7b8baa05bf6b09df39ea5b4059a..72adbd80ea534eb0becd3e517c00b0c26d00444c 100644
|
|
|
b2d430 |
--- a/src/confdb/confdb.h
|
|
|
b2d430 |
+++ b/src/confdb/confdb.h
|
|
|
b2d430 |
@@ -315,7 +315,7 @@ struct sss_domain_info {
|
|
|
b2d430 |
*/
|
|
|
b2d430 |
char *forest;
|
|
|
b2d430 |
struct sss_domain_info *forest_root;
|
|
|
b2d430 |
- char **upn_suffixes;
|
|
|
b2d430 |
+ const char **upn_suffixes;
|
|
|
b2d430 |
};
|
|
|
b2d430 |
|
|
|
b2d430 |
/**
|
|
|
b2d430 |
diff --git a/src/db/sysdb.h b/src/db/sysdb.h
|
|
|
b2d430 |
index a8dcaa4a9ac5715150487f7efc9c35b778fa0163..407ce3c18a7077e8fe45c3c9c7576ae626105122 100644
|
|
|
b2d430 |
--- a/src/db/sysdb.h
|
|
|
b2d430 |
+++ b/src/db/sysdb.h
|
|
|
b2d430 |
@@ -466,7 +466,8 @@ errno_t sysdb_subdomain_store(struct sysdb_ctx *sysdb,
|
|
|
b2d430 |
const char *name, const char *realm,
|
|
|
b2d430 |
const char *flat_name, const char *domain_id,
|
|
|
b2d430 |
bool mpg, bool enumerate, const char *forest,
|
|
|
b2d430 |
- uint32_t trust_direction);
|
|
|
b2d430 |
+ uint32_t trust_direction,
|
|
|
b2d430 |
+ struct ldb_message_element *upn_suffixes);
|
|
|
b2d430 |
|
|
|
b2d430 |
errno_t sysdb_update_subdomains(struct sss_domain_info *domain);
|
|
|
b2d430 |
|
|
|
b2d430 |
diff --git a/src/db/sysdb_subdomains.c b/src/db/sysdb_subdomains.c
|
|
|
b2d430 |
index c0a190f36d886325a5be1e5d1145b6aef6860ffc..02206e470e8e035cc05848137df6a1eb04806869 100644
|
|
|
b2d430 |
--- a/src/db/sysdb_subdomains.c
|
|
|
b2d430 |
+++ b/src/db/sysdb_subdomains.c
|
|
|
b2d430 |
@@ -237,6 +237,7 @@ errno_t sysdb_update_subdomains(struct sss_domain_info *domain)
|
|
|
b2d430 |
SYSDB_SUBDOMAIN_ENUM,
|
|
|
b2d430 |
SYSDB_SUBDOMAIN_FOREST,
|
|
|
b2d430 |
SYSDB_SUBDOMAIN_TRUST_DIRECTION,
|
|
|
b2d430 |
+ SYSDB_UPN_SUFFIXES,
|
|
|
b2d430 |
NULL};
|
|
|
b2d430 |
struct sss_domain_info *dom;
|
|
|
b2d430 |
struct ldb_dn *basedn;
|
|
|
b2d430 |
@@ -248,6 +249,8 @@ errno_t sysdb_update_subdomains(struct sss_domain_info *domain)
|
|
|
b2d430 |
bool mpg;
|
|
|
b2d430 |
bool enumerate;
|
|
|
b2d430 |
uint32_t trust_direction;
|
|
|
b2d430 |
+ struct ldb_message_element *tmp_el;
|
|
|
b2d430 |
+ const char **upn_suffixes;
|
|
|
b2d430 |
|
|
|
b2d430 |
tmp_ctx = talloc_new(NULL);
|
|
|
b2d430 |
if (tmp_ctx == NULL) {
|
|
|
b2d430 |
@@ -308,6 +311,17 @@ errno_t sysdb_update_subdomains(struct sss_domain_info *domain)
|
|
|
b2d430 |
forest = ldb_msg_find_attr_as_string(res->msgs[i],
|
|
|
b2d430 |
SYSDB_SUBDOMAIN_FOREST, NULL);
|
|
|
b2d430 |
|
|
|
b2d430 |
+ upn_suffixes = NULL;
|
|
|
b2d430 |
+ tmp_el = ldb_msg_find_element(res->msgs[0], SYSDB_UPN_SUFFIXES);
|
|
|
b2d430 |
+ if (tmp_el != NULL) {
|
|
|
b2d430 |
+ upn_suffixes = sss_ldb_el_to_string_list(tmp_ctx, tmp_el);
|
|
|
b2d430 |
+ if (upn_suffixes == NULL) {
|
|
|
b2d430 |
+ DEBUG(SSSDBG_OP_FAILURE, "sss_ldb_el_to_string_list failed.\n");
|
|
|
b2d430 |
+ ret = ENOMEM;
|
|
|
b2d430 |
+ goto done;
|
|
|
b2d430 |
+ }
|
|
|
b2d430 |
+ }
|
|
|
b2d430 |
+
|
|
|
b2d430 |
trust_direction = ldb_msg_find_attr_as_int(res->msgs[i],
|
|
|
b2d430 |
SYSDB_SUBDOMAIN_TRUST_DIRECTION,
|
|
|
b2d430 |
0);
|
|
|
b2d430 |
@@ -382,6 +396,9 @@ errno_t sysdb_update_subdomains(struct sss_domain_info *domain)
|
|
|
b2d430 |
}
|
|
|
b2d430 |
}
|
|
|
b2d430 |
|
|
|
b2d430 |
+ talloc_zfree(dom->upn_suffixes);
|
|
|
b2d430 |
+ dom->upn_suffixes = talloc_steal(dom, upn_suffixes);
|
|
|
b2d430 |
+
|
|
|
b2d430 |
if (!dom->has_views && dom->view_name == NULL) {
|
|
|
b2d430 |
/* maybe views are not initialized, copy from parent */
|
|
|
b2d430 |
dom->has_views = dom->parent->has_views;
|
|
|
b2d430 |
@@ -448,7 +465,7 @@ errno_t sysdb_master_domain_update(struct sss_domain_info *domain)
|
|
|
b2d430 |
errno_t ret;
|
|
|
b2d430 |
TALLOC_CTX *tmp_ctx;
|
|
|
b2d430 |
const char *tmp_str;
|
|
|
b2d430 |
- struct ldb_message_element **tmp_el;
|
|
|
b2d430 |
+ struct ldb_message_element *tmp_el;
|
|
|
b2d430 |
struct ldb_dn *basedn;
|
|
|
b2d430 |
struct ldb_result *res;
|
|
|
b2d430 |
const char *attrs[] = {"cn",
|
|
|
b2d430 |
@@ -806,7 +823,8 @@ errno_t sysdb_subdomain_store(struct sysdb_ctx *sysdb,
|
|
|
b2d430 |
const char *name, const char *realm,
|
|
|
b2d430 |
const char *flat_name, const char *domain_id,
|
|
|
b2d430 |
bool mpg, bool enumerate, const char *forest,
|
|
|
b2d430 |
- uint32_t trust_direction)
|
|
|
b2d430 |
+ uint32_t trust_direction,
|
|
|
b2d430 |
+ struct ldb_message_element *upn_suffixes)
|
|
|
b2d430 |
{
|
|
|
b2d430 |
TALLOC_CTX *tmp_ctx;
|
|
|
b2d430 |
struct ldb_message *msg;
|
|
|
b2d430 |
@@ -820,8 +838,10 @@ errno_t sysdb_subdomain_store(struct sysdb_ctx *sysdb,
|
|
|
b2d430 |
SYSDB_SUBDOMAIN_ENUM,
|
|
|
b2d430 |
SYSDB_SUBDOMAIN_FOREST,
|
|
|
b2d430 |
SYSDB_SUBDOMAIN_TRUST_DIRECTION,
|
|
|
b2d430 |
+ SYSDB_UPN_SUFFIXES,
|
|
|
b2d430 |
NULL};
|
|
|
b2d430 |
const char *tmp_str;
|
|
|
b2d430 |
+ struct ldb_message_element *tmp_el;
|
|
|
b2d430 |
bool tmp_bool;
|
|
|
b2d430 |
bool store = false;
|
|
|
b2d430 |
int realm_flags = 0;
|
|
|
b2d430 |
@@ -831,6 +851,7 @@ errno_t sysdb_subdomain_store(struct sysdb_ctx *sysdb,
|
|
|
b2d430 |
int enum_flags = 0;
|
|
|
b2d430 |
int forest_flags = 0;
|
|
|
b2d430 |
int td_flags = 0;
|
|
|
b2d430 |
+ int upn_flags = 0;
|
|
|
b2d430 |
uint32_t tmp_td;
|
|
|
b2d430 |
int ret;
|
|
|
b2d430 |
|
|
|
b2d430 |
@@ -864,6 +885,7 @@ errno_t sysdb_subdomain_store(struct sysdb_ctx *sysdb,
|
|
|
b2d430 |
enum_flags = LDB_FLAG_MOD_ADD;
|
|
|
b2d430 |
if (forest) forest_flags = LDB_FLAG_MOD_ADD;
|
|
|
b2d430 |
if (trust_direction) td_flags = LDB_FLAG_MOD_ADD;
|
|
|
b2d430 |
+ if (upn_suffixes) upn_flags = LDB_FLAG_MOD_ADD;
|
|
|
b2d430 |
} else if (res->count != 1) {
|
|
|
b2d430 |
ret = EINVAL;
|
|
|
b2d430 |
goto done;
|
|
|
b2d430 |
@@ -915,11 +937,21 @@ errno_t sysdb_subdomain_store(struct sysdb_ctx *sysdb,
|
|
|
b2d430 |
if (tmp_td != trust_direction) {
|
|
|
b2d430 |
td_flags = LDB_FLAG_MOD_REPLACE;
|
|
|
b2d430 |
}
|
|
|
b2d430 |
+
|
|
|
b2d430 |
+ if (upn_suffixes) {
|
|
|
b2d430 |
+ tmp_el = ldb_msg_find_element(res->msgs[0], SYSDB_UPN_SUFFIXES);
|
|
|
b2d430 |
+ /* Luckily ldb_msg_element_compare() only compares the values and
|
|
|
b2d430 |
+ * not the name. */
|
|
|
b2d430 |
+ if (tmp_el == NULL
|
|
|
b2d430 |
+ || ldb_msg_element_compare(upn_suffixes, tmp_el) != 0) {
|
|
|
b2d430 |
+ upn_flags = LDB_FLAG_MOD_REPLACE;
|
|
|
b2d430 |
+ }
|
|
|
b2d430 |
+ }
|
|
|
b2d430 |
}
|
|
|
b2d430 |
|
|
|
b2d430 |
if (!store && realm_flags == 0 && flat_flags == 0 && id_flags == 0
|
|
|
b2d430 |
&& mpg_flags == 0 && enum_flags == 0 && forest_flags == 0
|
|
|
b2d430 |
- && td_flags == 0) {
|
|
|
b2d430 |
+ && td_flags == 0 && upn_flags == 0) {
|
|
|
b2d430 |
ret = EOK;
|
|
|
b2d430 |
goto done;
|
|
|
b2d430 |
}
|
|
|
b2d430 |
@@ -1048,6 +1080,24 @@ errno_t sysdb_subdomain_store(struct sysdb_ctx *sysdb,
|
|
|
b2d430 |
}
|
|
|
b2d430 |
}
|
|
|
b2d430 |
|
|
|
b2d430 |
+ if (upn_flags) {
|
|
|
b2d430 |
+ tmp_el = talloc_zero(tmp_ctx, struct ldb_message_element);
|
|
|
b2d430 |
+ if (tmp_el == NULL) {
|
|
|
b2d430 |
+ DEBUG(SSSDBG_OP_FAILURE, "talloc_zero failed.\n");
|
|
|
b2d430 |
+ ret = ENOMEM;
|
|
|
b2d430 |
+ goto done;
|
|
|
b2d430 |
+ }
|
|
|
b2d430 |
+
|
|
|
b2d430 |
+ tmp_el->name = SYSDB_UPN_SUFFIXES;
|
|
|
b2d430 |
+ tmp_el->num_values = upn_suffixes->num_values;
|
|
|
b2d430 |
+ tmp_el->values = upn_suffixes->values;
|
|
|
b2d430 |
+ ret = ldb_msg_add(msg, tmp_el, upn_flags);
|
|
|
b2d430 |
+ if (ret != LDB_SUCCESS) {
|
|
|
b2d430 |
+ ret = sysdb_error_to_errno(ret);
|
|
|
b2d430 |
+ goto done;
|
|
|
b2d430 |
+ }
|
|
|
b2d430 |
+ }
|
|
|
b2d430 |
+
|
|
|
b2d430 |
ret = ldb_modify(sysdb->ldb, msg);
|
|
|
b2d430 |
if (ret != LDB_SUCCESS) {
|
|
|
b2d430 |
DEBUG(SSSDBG_FATAL_FAILURE, "Failed to add subdomain attributes to "
|
|
|
b2d430 |
diff --git a/src/providers/ad/ad_subdomains.c b/src/providers/ad/ad_subdomains.c
|
|
|
b2d430 |
index 0a8d1f53cb005507abe4ac55d0fa1ccc9e32b173..928c4fe93cc6afa5c3f69c14503896db820a4c0a 100644
|
|
|
b2d430 |
--- a/src/providers/ad/ad_subdomains.c
|
|
|
b2d430 |
+++ b/src/providers/ad/ad_subdomains.c
|
|
|
b2d430 |
@@ -252,7 +252,7 @@ ad_subdom_store(struct sdap_idmap_ctx *idmap_ctx,
|
|
|
b2d430 |
mpg = sdap_idmap_domain_has_algorithmic_mapping(idmap_ctx, name, sid_str);
|
|
|
b2d430 |
|
|
|
b2d430 |
ret = sysdb_subdomain_store(domain->sysdb, name, realm, flat, sid_str,
|
|
|
b2d430 |
- mpg, enumerate, domain->forest, 0);
|
|
|
b2d430 |
+ mpg, enumerate, domain->forest, 0, NULL);
|
|
|
b2d430 |
if (ret != EOK) {
|
|
|
b2d430 |
DEBUG(SSSDBG_OP_FAILURE, "sysdb_subdomain_store failed.\n");
|
|
|
b2d430 |
goto done;
|
|
|
b2d430 |
diff --git a/src/providers/ipa/ipa_subdomains.c b/src/providers/ipa/ipa_subdomains.c
|
|
|
b2d430 |
index 62b8f65e5d29a4850f90ea7c19abd297becc96f5..925b1d8b133eb56724ee4f9133a2487090982a8b 100644
|
|
|
b2d430 |
--- a/src/providers/ipa/ipa_subdomains.c
|
|
|
b2d430 |
+++ b/src/providers/ipa/ipa_subdomains.c
|
|
|
b2d430 |
@@ -375,6 +375,7 @@ static errno_t ipa_subdom_store(struct sss_domain_info *parent,
|
|
|
b2d430 |
bool mpg;
|
|
|
b2d430 |
bool enumerate;
|
|
|
b2d430 |
uint32_t direction;
|
|
|
b2d430 |
+ struct ldb_message_element *alternative_domain_suffixes = NULL;
|
|
|
b2d430 |
|
|
|
b2d430 |
tmp_ctx = talloc_new(parent);
|
|
|
b2d430 |
if (tmp_ctx == NULL) {
|
|
|
b2d430 |
@@ -405,6 +406,12 @@ static errno_t ipa_subdom_store(struct sss_domain_info *parent,
|
|
|
b2d430 |
goto done;
|
|
|
b2d430 |
}
|
|
|
b2d430 |
|
|
|
b2d430 |
+ ret = sysdb_attrs_get_el_ext(attrs, IPA_ADDITIONAL_SUFFIXES, false,
|
|
|
b2d430 |
+ &alternative_domain_suffixes);
|
|
|
b2d430 |
+ if (ret != EOK && ret != ENOENT) {
|
|
|
b2d430 |
+ goto done;
|
|
|
b2d430 |
+ }
|
|
|
b2d430 |
+
|
|
|
b2d430 |
mpg = sdap_idmap_domain_has_algorithmic_mapping(sdap_idmap_ctx, name, id);
|
|
|
b2d430 |
|
|
|
b2d430 |
ret = ipa_subdom_get_forest(tmp_ctx, sysdb_ctx_get_ldb(parent->sysdb),
|
|
|
b2d430 |
@@ -431,7 +438,7 @@ static errno_t ipa_subdom_store(struct sss_domain_info *parent,
|
|
|
b2d430 |
"Trust direction of %s is %s\n", name, ipa_trust_dir2str(direction));
|
|
|
b2d430 |
ret = sysdb_subdomain_store(parent->sysdb, name, realm, flat,
|
|
|
b2d430 |
id, mpg, enumerate, forest,
|
|
|
b2d430 |
- direction);
|
|
|
b2d430 |
+ direction, alternative_domain_suffixes);
|
|
|
b2d430 |
if (ret) {
|
|
|
b2d430 |
DEBUG(SSSDBG_OP_FAILURE, "sysdb_subdomain_store failed.\n");
|
|
|
b2d430 |
goto done;
|
|
|
b2d430 |
diff --git a/src/tests/cmocka/test_ipa_subdomains_server.c b/src/tests/cmocka/test_ipa_subdomains_server.c
|
|
|
b2d430 |
index 0fddc951894dee45658497851473b9bddbba0ef7..123cf11c01ef4687eecad31a9d73120a87c643e1 100644
|
|
|
b2d430 |
--- a/src/tests/cmocka/test_ipa_subdomains_server.c
|
|
|
b2d430 |
+++ b/src/tests/cmocka/test_ipa_subdomains_server.c
|
|
|
b2d430 |
@@ -253,14 +253,14 @@ static void add_test_subdomains(struct trust_test_ctx *test_ctx,
|
|
|
b2d430 |
SUBDOM_NAME, SUBDOM_REALM,
|
|
|
b2d430 |
NULL, SUBDOM_SID,
|
|
|
b2d430 |
true, false, SUBDOM_REALM,
|
|
|
b2d430 |
- direction);
|
|
|
b2d430 |
+ direction, NULL);
|
|
|
b2d430 |
assert_int_equal(ret, EOK);
|
|
|
b2d430 |
|
|
|
b2d430 |
ret = sysdb_subdomain_store(test_ctx->tctx->sysdb,
|
|
|
b2d430 |
CHILD_NAME, CHILD_REALM,
|
|
|
b2d430 |
CHILD_FLAT, CHILD_SID,
|
|
|
b2d430 |
true, false, SUBDOM_REALM,
|
|
|
b2d430 |
- direction);
|
|
|
b2d430 |
+ direction, NULL);
|
|
|
b2d430 |
assert_int_equal(ret, EOK);
|
|
|
b2d430 |
|
|
|
b2d430 |
ret = sysdb_update_subdomains(test_ctx->tctx->dom);
|
|
|
b2d430 |
diff --git a/src/tests/cmocka/test_nss_srv.c b/src/tests/cmocka/test_nss_srv.c
|
|
|
b2d430 |
index 4137e9151be561a57a8f2e674f385ecb37119255..82a304feed864b09168d0f3e06a4e1bb120df7e4 100644
|
|
|
b2d430 |
--- a/src/tests/cmocka/test_nss_srv.c
|
|
|
b2d430 |
+++ b/src/tests/cmocka/test_nss_srv.c
|
|
|
b2d430 |
@@ -3089,7 +3089,7 @@ static int nss_subdom_test_setup(void **state)
|
|
|
b2d430 |
|
|
|
b2d430 |
ret = sysdb_subdomain_store(nss_test_ctx->tctx->sysdb,
|
|
|
b2d430 |
testdom[0], testdom[1], testdom[2], testdom[3],
|
|
|
b2d430 |
- false, false, NULL, 0);
|
|
|
b2d430 |
+ false, false, NULL, 0, NULL);
|
|
|
b2d430 |
assert_int_equal(ret, EOK);
|
|
|
b2d430 |
|
|
|
b2d430 |
ret = sysdb_update_subdomains(nss_test_ctx->tctx->dom);
|
|
|
b2d430 |
diff --git a/src/tests/cmocka/test_sysdb_subdomains.c b/src/tests/cmocka/test_sysdb_subdomains.c
|
|
|
b2d430 |
index 6d1ec884284487a12bcbfad77c00cd6c30f67707..c9db56841e841472c81d00a79f475dbbd975ccb0 100644
|
|
|
b2d430 |
--- a/src/tests/cmocka/test_sysdb_subdomains.c
|
|
|
b2d430 |
+++ b/src/tests/cmocka/test_sysdb_subdomains.c
|
|
|
b2d430 |
@@ -103,7 +103,7 @@ static void test_sysdb_subdomain_create(void **state)
|
|
|
b2d430 |
|
|
|
b2d430 |
ret = sysdb_subdomain_store(test_ctx->tctx->sysdb,
|
|
|
b2d430 |
dom1[0], dom1[1], dom1[2], dom1[3],
|
|
|
b2d430 |
- false, false, NULL, 0);
|
|
|
b2d430 |
+ false, false, NULL, 0, NULL);
|
|
|
b2d430 |
assert_int_equal(ret, EOK);
|
|
|
b2d430 |
|
|
|
b2d430 |
ret = sysdb_update_subdomains(test_ctx->tctx->dom);
|
|
|
b2d430 |
@@ -115,7 +115,7 @@ static void test_sysdb_subdomain_create(void **state)
|
|
|
b2d430 |
|
|
|
b2d430 |
ret = sysdb_subdomain_store(test_ctx->tctx->sysdb,
|
|
|
b2d430 |
dom2[0], dom2[1], dom2[2], dom2[3],
|
|
|
b2d430 |
- false, false, NULL, 1);
|
|
|
b2d430 |
+ false, false, NULL, 1, NULL);
|
|
|
b2d430 |
assert_int_equal(ret, EOK);
|
|
|
b2d430 |
|
|
|
b2d430 |
ret = sysdb_update_subdomains(test_ctx->tctx->dom);
|
|
|
b2d430 |
@@ -128,12 +128,12 @@ static void test_sysdb_subdomain_create(void **state)
|
|
|
b2d430 |
/* Reverse the trust directions */
|
|
|
b2d430 |
ret = sysdb_subdomain_store(test_ctx->tctx->sysdb,
|
|
|
b2d430 |
dom1[0], dom1[1], dom1[2], dom1[3],
|
|
|
b2d430 |
- false, false, NULL, 1);
|
|
|
b2d430 |
+ false, false, NULL, 1, NULL);
|
|
|
b2d430 |
assert_int_equal(ret, EOK);
|
|
|
b2d430 |
|
|
|
b2d430 |
ret = sysdb_subdomain_store(test_ctx->tctx->sysdb,
|
|
|
b2d430 |
dom2[0], dom2[1], dom2[2], dom2[3],
|
|
|
b2d430 |
- false, false, NULL, 0);
|
|
|
b2d430 |
+ false, false, NULL, 0, NULL);
|
|
|
b2d430 |
assert_int_equal(ret, EOK);
|
|
|
b2d430 |
|
|
|
b2d430 |
ret = sysdb_update_subdomains(test_ctx->tctx->dom);
|
|
|
b2d430 |
@@ -215,27 +215,27 @@ static void test_sysdb_link_forest_root_ipa(void **state)
|
|
|
b2d430 |
|
|
|
b2d430 |
ret = sysdb_subdomain_store(test_ctx->tctx->sysdb,
|
|
|
b2d430 |
dom1[0], dom1[1], dom1[2], dom1[3],
|
|
|
b2d430 |
- false, false, dom1[4], 0);
|
|
|
b2d430 |
+ false, false, dom1[4], 0, NULL);
|
|
|
b2d430 |
assert_int_equal(ret, EOK);
|
|
|
b2d430 |
|
|
|
b2d430 |
ret = sysdb_subdomain_store(test_ctx->tctx->sysdb,
|
|
|
b2d430 |
child_dom1[0], child_dom1[1],
|
|
|
b2d430 |
child_dom1[2], child_dom1[3],
|
|
|
b2d430 |
false, false, child_dom1[4],
|
|
|
b2d430 |
- 0);
|
|
|
b2d430 |
+ 0, NULL);
|
|
|
b2d430 |
assert_int_equal(ret, EOK);
|
|
|
b2d430 |
|
|
|
b2d430 |
ret = sysdb_subdomain_store(test_ctx->tctx->sysdb,
|
|
|
b2d430 |
dom2[0], dom2[1], dom2[2], dom2[3],
|
|
|
b2d430 |
false, false, dom2[4],
|
|
|
b2d430 |
- 0);
|
|
|
b2d430 |
+ 0, NULL);
|
|
|
b2d430 |
assert_int_equal(ret, EOK);
|
|
|
b2d430 |
|
|
|
b2d430 |
ret = sysdb_subdomain_store(test_ctx->tctx->sysdb,
|
|
|
b2d430 |
child_dom2[0], child_dom2[1],
|
|
|
b2d430 |
child_dom2[2], child_dom2[3],
|
|
|
b2d430 |
false, false, child_dom2[4],
|
|
|
b2d430 |
- 0);
|
|
|
b2d430 |
+ 0, NULL);
|
|
|
b2d430 |
assert_int_equal(ret, EOK);
|
|
|
b2d430 |
|
|
|
b2d430 |
ret = sysdb_update_subdomains(test_ctx->tctx->dom);
|
|
|
b2d430 |
@@ -308,14 +308,14 @@ static void test_sysdb_link_forest_root_ad(void **state)
|
|
|
b2d430 |
child_dom[0], child_dom[1],
|
|
|
b2d430 |
child_dom[2], child_dom[3],
|
|
|
b2d430 |
false, false, child_dom[4],
|
|
|
b2d430 |
- 0);
|
|
|
b2d430 |
+ 0, NULL);
|
|
|
b2d430 |
assert_int_equal(ret, EOK);
|
|
|
b2d430 |
|
|
|
b2d430 |
ret = sysdb_subdomain_store(test_ctx->tctx->sysdb,
|
|
|
b2d430 |
sub_dom[0], sub_dom[1],
|
|
|
b2d430 |
sub_dom[2], sub_dom[3],
|
|
|
b2d430 |
false, false, sub_dom[4],
|
|
|
b2d430 |
- 0);
|
|
|
b2d430 |
+ 0, NULL);
|
|
|
b2d430 |
assert_int_equal(ret, EOK);
|
|
|
b2d430 |
|
|
|
b2d430 |
ret = sysdb_update_subdomains(test_ctx->tctx->dom);
|
|
|
b2d430 |
@@ -385,14 +385,14 @@ static void test_sysdb_link_forest_member_ad(void **state)
|
|
|
b2d430 |
sub_dom[0], sub_dom[1],
|
|
|
b2d430 |
sub_dom[2], sub_dom[3],
|
|
|
b2d430 |
false, false, sub_dom[4],
|
|
|
b2d430 |
- 0);
|
|
|
b2d430 |
+ 0, NULL);
|
|
|
b2d430 |
assert_int_equal(ret, EOK);
|
|
|
b2d430 |
|
|
|
b2d430 |
ret = sysdb_subdomain_store(test_ctx->tctx->sysdb,
|
|
|
b2d430 |
forest_root[0], forest_root[1],
|
|
|
b2d430 |
forest_root[2], forest_root[3],
|
|
|
b2d430 |
false, false, forest_root[4],
|
|
|
b2d430 |
- 0);
|
|
|
b2d430 |
+ 0, NULL);
|
|
|
b2d430 |
assert_int_equal(ret, EOK);
|
|
|
b2d430 |
|
|
|
b2d430 |
ret = sysdb_master_domain_update(test_ctx->tctx->dom);
|
|
|
b2d430 |
@@ -469,7 +469,7 @@ static void test_sysdb_link_ad_multidom(void **state)
|
|
|
b2d430 |
child_dom[0], child_dom[1],
|
|
|
b2d430 |
child_dom[2], child_dom[3],
|
|
|
b2d430 |
false, false, child_dom[4],
|
|
|
b2d430 |
- 0);
|
|
|
b2d430 |
+ 0, NULL);
|
|
|
b2d430 |
assert_int_equal(ret, EOK);
|
|
|
b2d430 |
|
|
|
b2d430 |
ret = sysdb_master_domain_update(main_dom1);
|
|
|
b2d430 |
@@ -489,7 +489,7 @@ static void test_sysdb_link_ad_multidom(void **state)
|
|
|
b2d430 |
ret = sysdb_subdomain_store(main_dom2->sysdb,
|
|
|
b2d430 |
dom2_forest_root[0], dom2_forest_root[1],
|
|
|
b2d430 |
dom2_forest_root[2], dom2_forest_root[3],
|
|
|
b2d430 |
- false, false, dom2_forest_root[4], 0);
|
|
|
b2d430 |
+ false, false, dom2_forest_root[4], 0, NULL);
|
|
|
b2d430 |
assert_int_equal(ret, EOK);
|
|
|
b2d430 |
|
|
|
b2d430 |
ret = sysdb_master_domain_update(main_dom2);
|
|
|
b2d430 |
diff --git a/src/tests/sysdb-tests.c b/src/tests/sysdb-tests.c
|
|
|
b2d430 |
index bac8a8788b4fde0d6039121efead6fc20fa046f9..d1450015cb0f0b073045e7b6031423e3f5494d78 100644
|
|
|
b2d430 |
--- a/src/tests/sysdb-tests.c
|
|
|
b2d430 |
+++ b/src/tests/sysdb-tests.c
|
|
|
b2d430 |
@@ -5472,7 +5472,7 @@ START_TEST(test_sysdb_subdomain_store_user)
|
|
|
b2d430 |
fail_unless(subdomain != NULL, "Failed to create new subdomin.");
|
|
|
b2d430 |
ret = sysdb_subdomain_store(test_ctx->sysdb,
|
|
|
b2d430 |
testdom[0], testdom[1], testdom[2], testdom[3],
|
|
|
b2d430 |
- false, false, NULL, 0);
|
|
|
b2d430 |
+ false, false, NULL, 0, NULL);
|
|
|
b2d430 |
fail_if(ret != EOK, "Could not set up the test (test subdom)");
|
|
|
b2d430 |
|
|
|
b2d430 |
ret = sysdb_update_subdomains(test_ctx->domain);
|
|
|
b2d430 |
@@ -5551,7 +5551,7 @@ START_TEST(test_sysdb_subdomain_user_ops)
|
|
|
b2d430 |
fail_unless(subdomain != NULL, "Failed to create new subdomin.");
|
|
|
b2d430 |
ret = sysdb_subdomain_store(test_ctx->sysdb,
|
|
|
b2d430 |
testdom[0], testdom[1], testdom[2], testdom[3],
|
|
|
b2d430 |
- false, false, NULL, 0);
|
|
|
b2d430 |
+ false, false, NULL, 0, NULL);
|
|
|
b2d430 |
fail_if(ret != EOK, "Could not set up the test (test subdom)");
|
|
|
b2d430 |
|
|
|
b2d430 |
ret = sysdb_update_subdomains(test_ctx->domain);
|
|
|
b2d430 |
@@ -5624,7 +5624,7 @@ START_TEST(test_sysdb_subdomain_group_ops)
|
|
|
b2d430 |
fail_unless(subdomain != NULL, "Failed to create new subdomin.");
|
|
|
b2d430 |
ret = sysdb_subdomain_store(test_ctx->sysdb,
|
|
|
b2d430 |
testdom[0], testdom[1], testdom[2], testdom[3],
|
|
|
b2d430 |
- false, false, NULL, 0);
|
|
|
b2d430 |
+ false, false, NULL, 0, NULL);
|
|
|
b2d430 |
fail_if(ret != EOK, "Could not set up the test (test subdom)");
|
|
|
b2d430 |
|
|
|
b2d430 |
ret = sysdb_update_subdomains(test_ctx->domain);
|
|
|
b2d430 |
--
|
|
|
b2d430 |
2.4.11
|
|
|
b2d430 |
|