|
|
836b22 |
From 796f3888e40d55ed888317c0be01026756866e16 Mon Sep 17 00:00:00 2001
|
|
|
836b22 |
From: Sumit Bose <sbose@redhat.com>
|
|
|
836b22 |
Date: Thu, 7 May 2020 21:18:13 +0200
|
|
|
836b22 |
Subject: [PATCH 32/36] sysdb: make new_subdomain() public
|
|
|
836b22 |
MIME-Version: 1.0
|
|
|
836b22 |
Content-Type: text/plain; charset=UTF-8
|
|
|
836b22 |
Content-Transfer-Encoding: 8bit
|
|
|
836b22 |
|
|
|
836b22 |
Resolves: https://github.com/SSSD/sssd/issues/5151
|
|
|
836b22 |
|
|
|
836b22 |
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
|
|
|
836b22 |
(cherry picked with changes from commit 9aa26f6514220bae3b3314f830e3e3f95fab2cf9)
|
|
|
836b22 |
|
|
|
836b22 |
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
|
|
|
836b22 |
---
|
|
|
836b22 |
src/db/sysdb.h | 18 ++++++++++++++++++
|
|
|
836b22 |
src/db/sysdb_private.h | 19 -------------------
|
|
|
836b22 |
src/tests/cmocka/test_responder_cache_req.c | 1 -
|
|
|
836b22 |
3 files changed, 18 insertions(+), 20 deletions(-)
|
|
|
836b22 |
|
|
|
836b22 |
diff --git a/src/db/sysdb.h b/src/db/sysdb.h
|
|
|
836b22 |
index beee710af..018ec22ab 100644
|
|
|
836b22 |
--- a/src/db/sysdb.h
|
|
|
836b22 |
+++ b/src/db/sysdb.h
|
|
|
836b22 |
@@ -561,6 +561,24 @@ errno_t sysdb_subdomain_delete(struct sysdb_ctx *sysdb, const char *name);
|
|
|
836b22 |
errno_t sysdb_subdomain_content_delete(struct sysdb_ctx *sysdb,
|
|
|
836b22 |
const char *name);
|
|
|
836b22 |
|
|
|
836b22 |
+/* The utility function to create a subdomain sss_domain_info object is handy
|
|
|
836b22 |
+ * for unit tests, so it should be available in a headerr.
|
|
|
836b22 |
+ */
|
|
|
836b22 |
+struct sss_domain_info *new_subdomain(TALLOC_CTX *mem_ctx,
|
|
|
836b22 |
+ struct sss_domain_info *parent,
|
|
|
836b22 |
+ const char *name,
|
|
|
836b22 |
+ const char *realm,
|
|
|
836b22 |
+ const char *flat_name,
|
|
|
836b22 |
+ const char *id,
|
|
|
836b22 |
+ enum sss_domain_mpg_mode mpg_mode,
|
|
|
836b22 |
+ bool enumerate,
|
|
|
836b22 |
+ const char *forest,
|
|
|
836b22 |
+ const char **upn_suffixes,
|
|
|
836b22 |
+ uint32_t trust_direction,
|
|
|
836b22 |
+ struct confdb_ctx *confdb,
|
|
|
836b22 |
+ bool enabled);
|
|
|
836b22 |
+
|
|
|
836b22 |
+
|
|
|
836b22 |
errno_t sysdb_get_ranges(TALLOC_CTX *mem_ctx, struct sysdb_ctx *sysdb,
|
|
|
836b22 |
size_t *range_count,
|
|
|
836b22 |
struct range_info ***range_list);
|
|
|
836b22 |
diff --git a/src/db/sysdb_private.h b/src/db/sysdb_private.h
|
|
|
836b22 |
index 7063d4594..0ccfa43ac 100644
|
|
|
836b22 |
--- a/src/db/sysdb_private.h
|
|
|
836b22 |
+++ b/src/db/sysdb_private.h
|
|
|
836b22 |
@@ -190,25 +190,6 @@ int sysdb_replace_ulong(struct ldb_message *msg,
|
|
|
836b22 |
int sysdb_delete_ulong(struct ldb_message *msg,
|
|
|
836b22 |
const char *attr, unsigned long value);
|
|
|
836b22 |
|
|
|
836b22 |
-/* The utility function to create a subdomain sss_domain_info object is handy
|
|
|
836b22 |
- * for unit tests, so it should be available in a header, but not a public util
|
|
|
836b22 |
- * one, because the only interface for the daemon itself should be adding
|
|
|
836b22 |
- * the sysdb domain object and calling sysdb_update_subdomains()
|
|
|
836b22 |
- */
|
|
|
836b22 |
-struct sss_domain_info *new_subdomain(TALLOC_CTX *mem_ctx,
|
|
|
836b22 |
- struct sss_domain_info *parent,
|
|
|
836b22 |
- const char *name,
|
|
|
836b22 |
- const char *realm,
|
|
|
836b22 |
- const char *flat_name,
|
|
|
836b22 |
- const char *id,
|
|
|
836b22 |
- enum sss_domain_mpg_mode mpg_mode,
|
|
|
836b22 |
- bool enumerate,
|
|
|
836b22 |
- const char *forest,
|
|
|
836b22 |
- const char **upn_suffixes,
|
|
|
836b22 |
- uint32_t trust_direction,
|
|
|
836b22 |
- struct confdb_ctx *confdb,
|
|
|
836b22 |
- bool enabled);
|
|
|
836b22 |
-
|
|
|
836b22 |
/* Helper functions to deal with the timestamp cache should not be used
|
|
|
836b22 |
* outside the sysdb itself. The timestamp cache should be completely
|
|
|
836b22 |
* opaque to the sysdb consumers
|
|
|
836b22 |
diff --git a/src/tests/cmocka/test_responder_cache_req.c b/src/tests/cmocka/test_responder_cache_req.c
|
|
|
836b22 |
index 9f3b49cd9..4f3bc0b58 100644
|
|
|
836b22 |
--- a/src/tests/cmocka/test_responder_cache_req.c
|
|
|
836b22 |
+++ b/src/tests/cmocka/test_responder_cache_req.c
|
|
|
836b22 |
@@ -27,7 +27,6 @@
|
|
|
836b22 |
#include "tests/cmocka/common_mock_resp.h"
|
|
|
836b22 |
#include "db/sysdb.h"
|
|
|
836b22 |
#include "responder/common/cache_req/cache_req.h"
|
|
|
836b22 |
-#include "db/sysdb_private.h" /* new_subdomain() */
|
|
|
836b22 |
|
|
|
836b22 |
#define TESTS_PATH "tp_" BASE_FILE_STEM
|
|
|
836b22 |
#define TEST_CONF_DB "test_responder_cache_req_conf.ldb"
|
|
|
836b22 |
--
|
|
|
836b22 |
2.21.1
|
|
|
836b22 |
|