diff options
author | Sumit Bose <sbose@redhat.com> | 2012-10-15 10:31:59 +0200 |
---|---|---|
committer | Sumit Bose <sbose@redhat.com> | 2012-10-26 10:32:05 +0200 |
commit | 008940825f1f6a68c7441d0c0eee8eaa1a3b03ab (patch) | |
tree | 5132856e5ea9ccfcaa62ea81d90ffc9f61075c05 /src/db | |
parent | 05ea6f6cf4f92bcb1fe9a46da6500be02285bae5 (diff) | |
download | sssd-008940825f1f6a68c7441d0c0eee8eaa1a3b03ab.tar.gz sssd-008940825f1f6a68c7441d0c0eee8eaa1a3b03ab.tar.bz2 sssd-008940825f1f6a68c7441d0c0eee8eaa1a3b03ab.zip |
sysdb: look for ranges in the parent tree
Make sure the right sub-tree in the cache is used to search for ranges.
Sub-domain trees do not have range objects only the tree of the parent
domain.
Diffstat (limited to 'src/db')
-rw-r--r-- | src/db/sysdb_ranges.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/db/sysdb_ranges.c b/src/db/sysdb_ranges.c index f100f5b8..adbabf7b 100644 --- a/src/db/sysdb_ranges.c +++ b/src/db/sysdb_ranges.c @@ -64,8 +64,11 @@ errno_t sysdb_get_ranges(TALLOC_CTX *mem_ctx, struct sysdb_ctx *sysdb, goto done; } + /* Ranges are stored in the tree of the parent domain */ basedn = ldb_dn_new_fmt(tmp_ctx, sysdb->ldb, SYSDB_TMPL_RANGE_BASE, - sysdb->domain->name); + sysdb->domain->parent != NULL ? + sysdb->domain->parent->name : + sysdb->domain->name); if (basedn == NULL) { ret = EIO; goto done; |