summaryrefslogtreecommitdiffstats
path: root/src/db
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2013-01-08 01:46:11 -0500
committerJakub Hrozek <jhrozek@redhat.com>2013-01-15 10:53:03 +0100
commit0754ff886f909f0404038eb9c99dd61be1acf5b9 (patch)
tree963461ed8190287d91419f4ec4efb757fbadc49e /src/db
parentb0fa48b0d612b46a86e45f8e4b5d9feae9784c2b (diff)
downloadsssd-0754ff886f909f0404038eb9c99dd61be1acf5b9.tar.gz
sssd-0754ff886f909f0404038eb9c99dd61be1acf5b9.tar.xz
sssd-0754ff886f909f0404038eb9c99dd61be1acf5b9.zip
Add domain to some subdomain functions
Diffstat (limited to 'src/db')
-rw-r--r--src/db/sysdb.h2
-rw-r--r--src/db/sysdb_subdomains.c11
2 files changed, 8 insertions, 5 deletions
diff --git a/src/db/sysdb.h b/src/db/sysdb.h
index d22186cb4..25304289f 100644
--- a/src/db/sysdb.h
+++ b/src/db/sysdb.h
@@ -380,9 +380,11 @@ errno_t sysdb_get_subdomain_context(TALLOC_CTX *mem_ctx,
errno_t sysdb_master_domain_get_info(TALLOC_CTX *mem_ctx,
struct sysdb_ctx *sysdb,
+ struct sss_domain_info *domain,
struct sysdb_subdom **info);
errno_t sysdb_master_domain_add_info(struct sysdb_ctx *sysdb,
+ struct sss_domain_info *domain,
struct sysdb_subdom *domain_info);
errno_t sysdb_get_ranges(TALLOC_CTX *mem_ctx, struct sysdb_ctx *sysdb,
diff --git a/src/db/sysdb_subdomains.c b/src/db/sysdb_subdomains.c
index 1f85b5726..6a3f9ee6c 100644
--- a/src/db/sysdb_subdomains.c
+++ b/src/db/sysdb_subdomains.c
@@ -130,6 +130,7 @@ done:
errno_t sysdb_master_domain_get_info(TALLOC_CTX *mem_ctx,
struct sysdb_ctx *sysdb,
+ struct sss_domain_info *domain,
struct sysdb_subdom **_info)
{
errno_t ret;
@@ -155,8 +156,7 @@ errno_t sysdb_master_domain_get_info(TALLOC_CTX *mem_ctx,
goto done;
}
- basedn = ldb_dn_new_fmt(tmp_ctx, sysdb->ldb, SYSDB_DOM_BASE,
- sysdb->domain->name);
+ basedn = ldb_dn_new_fmt(tmp_ctx, sysdb->ldb, SYSDB_DOM_BASE, domain->name);
if (basedn == NULL) {
ret = EIO;
goto done;
@@ -217,6 +217,7 @@ done:
}
errno_t sysdb_master_domain_add_info(struct sysdb_ctx *sysdb,
+ struct sss_domain_info *domain,
struct sysdb_subdom *domain_info)
{
TALLOC_CTX *tmp_ctx;
@@ -230,7 +231,7 @@ errno_t sysdb_master_domain_add_info(struct sysdb_ctx *sysdb,
return ENOMEM;
}
- ret = sysdb_master_domain_get_info(tmp_ctx, sysdb, &current_info);
+ ret = sysdb_master_domain_get_info(tmp_ctx, sysdb, domain, &current_info);
if (ret != EOK) {
goto done;
}
@@ -241,8 +242,8 @@ errno_t sysdb_master_domain_add_info(struct sysdb_ctx *sysdb,
goto done;
}
- msg->dn = ldb_dn_new_fmt(tmp_ctx, sysdb->ldb, SYSDB_DOM_BASE,
- sysdb->domain->name);
+ msg->dn = ldb_dn_new_fmt(tmp_ctx, sysdb->ldb,
+ SYSDB_DOM_BASE, domain->name);
if (msg->dn == NULL) {
ret = EIO;
goto done;