From e7cc651468ab8b1462a6a39e712e7b8d36a3a166 Mon Sep 17 00:00:00 2001 From: Sumit Bose Date: Wed, 24 Sep 2014 13:01:20 +0200 Subject: confdb: add has_views and view_name to sss_domain_info MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit To let the responders know which view is applied and to make view handling more efficiently especially when no view is applied/available two new member are added to the sss_domain_info struct. view_name is the name of the view if available. has_views is only true if the client has a specific view applied, i.e. it is false for the case when there are no views at all (e.g. plain LDAP provider) or the client has the FreeIPA default view. This allows the responders to easily bypass any view related code. Reviewed-by: Pavel Březina --- src/confdb/confdb.c | 3 +++ src/confdb/confdb.h | 3 +++ 2 files changed, 6 insertions(+) (limited to 'src/confdb') diff --git a/src/confdb/confdb.c b/src/confdb/confdb.c index 0adff2b08..8443fe553 100644 --- a/src/confdb/confdb.c +++ b/src/confdb/confdb.c @@ -1205,6 +1205,9 @@ static int confdb_get_domain_internal(struct confdb_ctx *cdb, goto done; } + domain->has_views = false; + domain->view_name = NULL; + *_domain = domain; ret = EOK; done: diff --git a/src/confdb/confdb.h b/src/confdb/confdb.h index 720b7dc1c..34d461065 100644 --- a/src/confdb/confdb.h +++ b/src/confdb/confdb.h @@ -255,6 +255,9 @@ struct sss_domain_info { char *forest; struct timeval subdomains_last_checked; + bool has_views; + char *view_name; + struct sss_domain_info *prev; struct sss_domain_info *next; -- cgit