diff options
author | Nalin Dahyabhai <nalin@dahyabhai.net> | 2013-09-12 15:32:27 -0400 |
---|---|---|
committer | Nalin Dahyabhai <nalin@dahyabhai.net> | 2013-09-12 15:32:27 -0400 |
commit | fc646c3c86afc0c7817207bb598deb0df11387fa (patch) | |
tree | b54902510bb308fe5b61496bf1ed9f6cf7eac704 /src/back-sch.c | |
parent | eb43fd14cbe47e014139838200f31e01e1fc8a10 (diff) | |
download | slapi-nis-fc646c3c86afc0c7817207bb598deb0df11387fa.tar.gz slapi-nis-fc646c3c86afc0c7817207bb598deb0df11387fa.tar.xz slapi-nis-fc646c3c86afc0c7817207bb598deb0df11387fa.zip |
Add schema-compat-relevant-subtree
Add a schema-compat-relevant-subtree configuration option, listing the
only parts of the DIT that we should ever look at, either as source
entries or as other entries which contain data which might be pulled in
as part of computing the contents of compat entries.
This is more or less the whitelist to schema-compat-ignore-subtree's
blacklist.
Diffstat (limited to 'src/back-sch.c')
-rw-r--r-- | src/back-sch.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/back-sch.c b/src/back-sch.c index 047f2dc..3130fbc 100644 --- a/src/back-sch.c +++ b/src/back-sch.c @@ -79,6 +79,7 @@ backend_set_config_free_config_contents(void *data) free(set_data->common.group); free(set_data->common.set); free(set_data->common.bases); + backend_shr_free_sdnlist(set_data->common.relevant_subtrees); backend_shr_free_sdnlist(set_data->common.ignore_subtrees); format_free_attr_list(set_data->common.rel_attrs); free(set_data->common.rel_attr_list); @@ -111,6 +112,7 @@ backend_copy_set_config(const struct backend_set_data *data) ret->common.group = strdup(data->common.group); ret->common.set = strdup(data->common.set); ret->common.bases = backend_shr_dup_strlist(data->common.bases); + ret->common.relevant_subtrees = backend_shr_dup_sdnlist(data->common.relevant_subtrees); ret->common.ignore_subtrees = backend_shr_dup_sdnlist(data->common.ignore_subtrees); ret->common.rel_attrs = data->common.rel_attrs ? format_dup_attr_list(data->common.rel_attrs) : @@ -162,11 +164,13 @@ backend_set_config_read_config(struct plugin_state *state, Slapi_Entry *e, bool_t check_access; struct backend_set_data ret; Slapi_DN *tmp_sdn; - const Slapi_DN **ignore_subtrees; + const Slapi_DN **relevant_subtrees, **ignore_subtrees; /* Read the values from the configuration entry. */ bases = backend_shr_get_vattr_strlist(state, e, SCH_CONTAINER_CONFIGURATION_BASE_ATTR); + relevant_subtrees = backend_shr_get_vattr_sdnlist(state, e, + SCH_CONTAINER_CONFIGURATION_RELEVANT_SUBTREES_ATTR); ignore_subtrees = backend_shr_get_vattr_sdnlist(state, e, SCH_CONTAINER_CONFIGURATION_IGNORE_SUBTREES_ATTR); entry_filter = backend_shr_get_vattr_filter(state, e, @@ -189,6 +193,7 @@ backend_set_config_read_config(struct plugin_state *state, Slapi_Entry *e, slapi_sdn_free(&tmp_sdn); ret.common.set = strdup(container); ret.common.bases = bases; + ret.common.relevant_subtrees = relevant_subtrees; ret.common.ignore_subtrees = ignore_subtrees; ret.common.entry_filter = entry_filter; ret.common.rel_attrs = NULL; @@ -254,6 +259,7 @@ backend_set_config_read_config(struct plugin_state *state, Slapi_Entry *e, free(ret.common.group); free(ret.common.set); backend_shr_free_strlist(ret.common.bases); + backend_shr_free_sdnlist(ret.common.relevant_subtrees); backend_shr_free_sdnlist(ret.common.ignore_subtrees); free(ret.common.entry_filter); slapi_sdn_free(&ret.container_sdn); |