From 0754ff886f909f0404038eb9c99dd61be1acf5b9 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Tue, 8 Jan 2013 01:46:11 -0500 Subject: Add domain to some subdomain functions --- src/db/sysdb.h | 2 ++ src/db/sysdb_subdomains.c | 11 ++++++----- 2 files changed, 8 insertions(+), 5 deletions(-) (limited to 'src/db') diff --git a/src/db/sysdb.h b/src/db/sysdb.h index d22186cb..25304289 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 1f85b572..6a3f9ee6 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, ¤t_info); + ret = sysdb_master_domain_get_info(tmp_ctx, sysdb, domain, ¤t_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; -- cgit