summaryrefslogtreecommitdiff
path: root/src/providers/ldap
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2013-01-07 23:33:45 -0500
committerJakub Hrozek <jhrozek@redhat.com>2013-01-15 10:53:02 +0100
commit2b7ee2a760e7fcc70f4970a3bbee6fbf8f2ccb9d (patch)
treec9e974ed04bd166b4dbab9dde3a6ae6442927a45 /src/providers/ldap
parent3412d14d65490c32414e72ac20fe21bad53ceb45 (diff)
downloadsssd-2b7ee2a760e7fcc70f4970a3bbee6fbf8f2ccb9d.tar.gz
sssd-2b7ee2a760e7fcc70f4970a3bbee6fbf8f2ccb9d.tar.bz2
sssd-2b7ee2a760e7fcc70f4970a3bbee6fbf8f2ccb9d.zip
Add domain argument to sysdb_search_groups()
Diffstat (limited to 'src/providers/ldap')
-rw-r--r--src/providers/ldap/ldap_id_cleanup.c11
-rw-r--r--src/providers/ldap/sdap_async_groups.c3
-rw-r--r--src/providers/ldap/sdap_reinit.c5
3 files changed, 12 insertions, 7 deletions
diff --git a/src/providers/ldap/ldap_id_cleanup.c b/src/providers/ldap/ldap_id_cleanup.c
index 77c4d94e..103cca97 100644
--- a/src/providers/ldap/ldap_id_cleanup.c
+++ b/src/providers/ldap/ldap_id_cleanup.c
@@ -171,7 +171,8 @@ struct global_cleanup_state {
static int cleanup_users(TALLOC_CTX *memctx, struct sdap_id_ctx *ctx);
static int cleanup_groups(TALLOC_CTX *memctx,
- struct sysdb_ctx *sysdb);
+ struct sysdb_ctx *sysdb,
+ struct sss_domain_info *domain);
struct tevent_req *ldap_id_cleanup_send(TALLOC_CTX *memctx,
struct tevent_context *ev,
@@ -203,7 +204,8 @@ struct tevent_req *ldap_id_cleanup_send(TALLOC_CTX *memctx,
}
ret = cleanup_groups(state,
- state->ctx->be->sysdb);
+ state->ctx->be->sysdb,
+ state->ctx->be->domain);
if (ret) {
goto fail;
}
@@ -380,7 +382,8 @@ static int cleanup_users_logged_in(hash_table_t *table,
/* ==Group-Cleanup-Process================================================ */
static int cleanup_groups(TALLOC_CTX *memctx,
- struct sysdb_ctx *sysdb)
+ struct sysdb_ctx *sysdb,
+ struct sss_domain_info *domain)
{
TALLOC_CTX *tmpctx;
const char *attrs[] = { SYSDB_NAME, SYSDB_GIDNUM, NULL };
@@ -411,7 +414,7 @@ static int cleanup_groups(TALLOC_CTX *memctx,
goto done;
}
- ret = sysdb_search_groups(tmpctx, sysdb,
+ ret = sysdb_search_groups(tmpctx, sysdb, domain,
subfilter, attrs, &count, &msgs);
if (ret) {
if (ret == ENOENT) {
diff --git a/src/providers/ldap/sdap_async_groups.c b/src/providers/ldap/sdap_async_groups.c
index fde83ee8..96cc7c0c 100644
--- a/src/providers/ldap/sdap_async_groups.c
+++ b/src/providers/ldap/sdap_async_groups.c
@@ -3025,7 +3025,8 @@ sdap_nested_group_check_cache(TALLOC_CTX *mem_ctx,
/* It wasn't a user. Check whether it's a group */
if (ret == EOK) talloc_zfree(msgs);
- ret = sysdb_search_groups(tmp_ctx, sysdb, filter, attrs, &count, &msgs);
+ ret = sysdb_search_groups(tmp_ctx, sysdb, dom,
+ filter, attrs, &count, &msgs);
if (ret != EOK && ret != ENOENT) {
ret = EIO;
goto fail;
diff --git a/src/providers/ldap/sdap_reinit.c b/src/providers/ldap/sdap_reinit.c
index cc836ae5..41d10249 100644
--- a/src/providers/ldap/sdap_reinit.c
+++ b/src/providers/ldap/sdap_reinit.c
@@ -153,7 +153,8 @@ static errno_t sdap_reinit_clear_usn(struct sysdb_ctx *sysdb,
msgs_num = 0;
/* reset groups' usn */
- ret = sysdb_search_groups(tmp_ctx, sysdb, "", attrs, &msgs_num, &msgs);
+ ret = sysdb_search_groups(tmp_ctx, sysdb, domain,
+ "", attrs, &msgs_num, &msgs);
if (ret != EOK) {
goto done;
}
@@ -279,7 +280,7 @@ static errno_t sdap_reinit_delete_records(struct sysdb_ctx *sysdb,
msgs_num = 0;
/* purge untouched groups */
- ret = sysdb_search_groups(tmp_ctx, sysdb, "(!("SYSDB_USN"=*))",
+ ret = sysdb_search_groups(tmp_ctx, sysdb, domain, "(!("SYSDB_USN"=*))",
attrs, &msgs_num, &msgs);
if (ret != EOK) {
goto done;