48 lines
1.7 KiB
Diff
48 lines
1.7 KiB
Diff
|
From 712e5b2e4465812c00a8667c75813322373bc657 Mon Sep 17 00:00:00 2001
|
||
|
From: Sumit Bose <sbose@redhat.com>
|
||
|
Date: Tue, 4 Apr 2017 14:35:47 +0200
|
||
|
Subject: [PATCH 127/135] utils: add sss_domain_is_forest_root()
|
||
|
MIME-Version: 1.0
|
||
|
Content-Type: text/plain; charset=UTF-8
|
||
|
Content-Transfer-Encoding: 8bit
|
||
|
|
||
|
Related to https://pagure.io/SSSD/sssd/issue/3361
|
||
|
|
||
|
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
|
||
|
---
|
||
|
src/util/domain_info_utils.c | 5 +++++
|
||
|
src/util/util.h | 1 +
|
||
|
2 files changed, 6 insertions(+)
|
||
|
|
||
|
diff --git a/src/util/domain_info_utils.c b/src/util/domain_info_utils.c
|
||
|
index 2af7852f03f89b61f5b9fd8a244e98fb27b7e6a2..541058a16d585155b3b51511740f7db45281e2fd 100644
|
||
|
--- a/src/util/domain_info_utils.c
|
||
|
+++ b/src/util/domain_info_utils.c
|
||
|
@@ -844,6 +844,11 @@ void sss_domain_set_state(struct sss_domain_info *dom,
|
||
|
"Domain %s is %s\n", dom->name, domain_state_str(dom));
|
||
|
}
|
||
|
|
||
|
+bool sss_domain_is_forest_root(struct sss_domain_info *dom)
|
||
|
+{
|
||
|
+ return (dom->forest_root == dom);
|
||
|
+}
|
||
|
+
|
||
|
bool is_email_from_domain(const char *email, struct sss_domain_info *dom)
|
||
|
{
|
||
|
const char *p;
|
||
|
diff --git a/src/util/util.h b/src/util/util.h
|
||
|
index 436550f5078cc173b8ed8cb58836d366f813146b..4ef13ced48addc19403402d7d880176da24ceec6 100644
|
||
|
--- a/src/util/util.h
|
||
|
+++ b/src/util/util.h
|
||
|
@@ -539,6 +539,7 @@ enum sss_domain_state sss_domain_get_state(struct sss_domain_info *dom);
|
||
|
void sss_domain_set_state(struct sss_domain_info *dom,
|
||
|
enum sss_domain_state state);
|
||
|
bool is_email_from_domain(const char *email, struct sss_domain_info *dom);
|
||
|
+bool sss_domain_is_forest_root(struct sss_domain_info *dom);
|
||
|
const char *sss_domain_type_str(struct sss_domain_info *dom);
|
||
|
|
||
|
struct sss_domain_info*
|
||
|
--
|
||
|
2.12.2
|
||
|
|