summaryrefslogtreecommitdiffstats
path: root/src/db/sysdb_ranges.c
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2012-10-15 10:31:59 +0200
committerSumit Bose <sbose@redhat.com>2012-10-26 10:32:05 +0200
commit008940825f1f6a68c7441d0c0eee8eaa1a3b03ab (patch)
tree5132856e5ea9ccfcaa62ea81d90ffc9f61075c05 /src/db/sysdb_ranges.c
parent05ea6f6cf4f92bcb1fe9a46da6500be02285bae5 (diff)
downloadsssd-008940825f1f6a68c7441d0c0eee8eaa1a3b03ab.tar.gz
sssd-008940825f1f6a68c7441d0c0eee8eaa1a3b03ab.tar.xz
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/sysdb_ranges.c')
-rw-r--r--src/db/sysdb_ranges.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/db/sysdb_ranges.c b/src/db/sysdb_ranges.c
index f100f5b87..adbabf7ba 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;