From 8a1738f9379a1b8fb5c95c3df649e014ff5a1434 Mon Sep 17 00:00:00 2001 From: Jan Zeleny Date: Wed, 18 May 2011 10:06:19 -0400 Subject: sysdb refactoring: deleted domain variables in sysdb API The patch also updates code using modified functions. Tests have also been adjusted. --- src/db/sysdb.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/db/sysdb.c') diff --git a/src/db/sysdb.c b/src/db/sysdb.c index d07f27df..dd7ce7ec 100644 --- a/src/db/sysdb.c +++ b/src/db/sysdb.c @@ -27,7 +27,7 @@ #define LDB_MODULES_PATH "LDB_MODULES_PATH" -static errno_t sysdb_ldb_connect(TALLOC_CTX *mem_ctx, const char *filename, +static errno_t sysdb_ldb_connect(TALLOC_CTX *mem_ctx, const char *filename, struct ldb_context **_ldb) { int ret; @@ -2199,7 +2199,6 @@ errno_t sysdb_attrs_to_list(TALLOC_CTX *memctx, } errno_t sysdb_has_enumerated(struct sysdb_ctx *sysdb, - struct sss_domain_info *dom, bool *has_enumerated) { errno_t ret; @@ -2219,7 +2218,7 @@ errno_t sysdb_has_enumerated(struct sysdb_ctx *sysdb, base_dn = ldb_dn_new_fmt(tmpctx, sysdb->ldb, SYSDB_DOM_BASE, - dom->name); + sysdb->domain->name); if (!base_dn) { ret = ENOMEM; goto done; @@ -2263,7 +2262,6 @@ done: } errno_t sysdb_set_enumerated(struct sysdb_ctx *sysdb, - struct sss_domain_info *dom, bool enumerated) { errno_t ret; @@ -2281,7 +2279,7 @@ errno_t sysdb_set_enumerated(struct sysdb_ctx *sysdb, dn = ldb_dn_new_fmt(tmp_ctx, sysdb->ldb, SYSDB_DOM_BASE, - dom->name); + sysdb->domain->name); if (!dn) { ret = ENOMEM; goto done; @@ -2303,7 +2301,7 @@ errno_t sysdb_set_enumerated(struct sysdb_ctx *sysdb, msg->dn = dn; if (res->count == 0) { - lret = ldb_msg_add_string(msg, "cn", dom->name); + lret = ldb_msg_add_string(msg, "cn", sysdb->domain->name); if (lret != LDB_SUCCESS) { ret = sysdb_error_to_errno(lret); goto done; -- cgit