diff options
author | Sumit Bose <sbose@redhat.com> | 2014-09-24 13:01:20 +0200 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2014-10-20 16:14:10 +0200 |
commit | e7cc651468ab8b1462a6a39e712e7b8d36a3a166 (patch) | |
tree | ecba95833e101ca63701f60d296d89f58ca93bd0 | |
parent | f834f712548db811695ea0fd6d6b31d3bd03e2a3 (diff) | |
download | sssd-e7cc651468ab8b1462a6a39e712e7b8d36a3a166.tar.gz sssd-e7cc651468ab8b1462a6a39e712e7b8d36a3a166.tar.xz sssd-e7cc651468ab8b1462a6a39e712e7b8d36a3a166.zip |
confdb: add has_views and view_name to sss_domain_info
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 <pbrezina@redhat.com>
-rw-r--r-- | src/confdb/confdb.c | 3 | ||||
-rw-r--r-- | src/confdb/confdb.h | 3 |
2 files changed, 6 insertions, 0 deletions
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; |