From ea224c3813a537639778f91ac762732b3c289603 Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Tue, 12 May 2015 14:24:00 +0200 Subject: SYSDB: Store trust direction for subdomains We need to store the subdomain trust direction in order to recover the structure after SSSD restart. The trust direction is a plain uint32_t to avoid leaking the knowledge about AD trust directions to sysdb while at the same time making it easy to compare values between sysdb and LDAP and avoid translating the values. Reviewed-by: Sumit Bose --- src/util/domain_info_utils.c | 4 +++- src/util/util.h | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'src/util') diff --git a/src/util/domain_info_utils.c b/src/util/domain_info_utils.c index 073ba3c6a..aa5fc9ad0 100644 --- a/src/util/domain_info_utils.c +++ b/src/util/domain_info_utils.c @@ -203,7 +203,8 @@ struct sss_domain_info *new_subdomain(TALLOC_CTX *mem_ctx, const char *id, bool mpg, bool enumerate, - const char *forest) + const char *forest, + uint32_t trust_direction) { struct sss_domain_info *dom; bool inherit_option; @@ -290,6 +291,7 @@ struct sss_domain_info *new_subdomain(TALLOC_CTX *mem_ctx, dom->ignore_group_members = parent->ignore_group_members; } + dom->trust_direction = trust_direction; /* If the parent domain explicitly limits ID ranges, the subdomain * should honour the limits as well. */ diff --git a/src/util/util.h b/src/util/util.h index c86bcea5b..8eaeef45d 100644 --- a/src/util/util.h +++ b/src/util/util.h @@ -577,7 +577,8 @@ struct sss_domain_info *new_subdomain(TALLOC_CTX *mem_ctx, const char *id, bool mpg, bool enumerate, - const char *forest); + const char *forest, + uint32_t trust_direction); errno_t sssd_domain_init(TALLOC_CTX *mem_ctx, struct confdb_ctx *cdb, -- cgit