summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/db/sysdb.h1
-rw-r--r--src/db/sysdb_ops.c5
-rw-r--r--src/tests/sysdb-tests.c1
3 files changed, 5 insertions, 2 deletions
diff --git a/src/db/sysdb.h b/src/db/sysdb.h
index eab3ce073..739842dfb 100644
--- a/src/db/sysdb.h
+++ b/src/db/sysdb.h
@@ -562,6 +562,7 @@ int sysdb_search_group_by_gid(TALLOC_CTX *mem_ctx,
/* Search Netgroup (by name) */
int sysdb_search_netgroup_by_name(TALLOC_CTX *mem_ctx,
struct sysdb_ctx *sysdb,
+ struct sss_domain_info *domain,
const char *name,
const char **attrs,
struct ldb_message **msg);
diff --git a/src/db/sysdb_ops.c b/src/db/sysdb_ops.c
index 654aa2cfe..013d073bd 100644
--- a/src/db/sysdb_ops.c
+++ b/src/db/sysdb_ops.c
@@ -441,6 +441,7 @@ done:
int sysdb_search_netgroup_by_name(TALLOC_CTX *mem_ctx,
struct sysdb_ctx *sysdb,
+ struct sss_domain_info *domain,
const char *name,
const char **attrs,
struct ldb_message **msg)
@@ -457,7 +458,7 @@ int sysdb_search_netgroup_by_name(TALLOC_CTX *mem_ctx,
return ENOMEM;
}
- basedn = sysdb_netgroup_dn(sysdb, tmp_ctx, sysdb->domain, name);
+ basedn = sysdb_netgroup_dn(sysdb, tmp_ctx, domain, name);
if (!basedn) {
ret = ENOMEM;
goto done;
@@ -2662,7 +2663,7 @@ int sysdb_delete_netgroup(struct sysdb_ctx *sysdb,
return ENOMEM;
}
- ret = sysdb_search_netgroup_by_name(tmp_ctx, sysdb,
+ ret = sysdb_search_netgroup_by_name(tmp_ctx, sysdb, sysdb->domain,
name, NULL, &msg);
if (ret != EOK && ret != ENOENT) {
DEBUG(6, ("sysdb_search_netgroup_by_name failed: %d (%s)\n",
diff --git a/src/tests/sysdb-tests.c b/src/tests/sysdb-tests.c
index 56d9f4242..db30f2fac 100644
--- a/src/tests/sysdb-tests.c
+++ b/src/tests/sysdb-tests.c
@@ -3562,6 +3562,7 @@ START_TEST (test_sysdb_search_netgroup_by_name)
netgrname = talloc_asprintf(test_ctx, "testnetgr%d", _i);
ret = sysdb_search_netgroup_by_name(test_ctx, test_ctx->sysdb,
+ test_ctx->domain,
netgrname, NULL, &msg);
fail_if(ret != EOK, "Could not find netgroup with name %s", netgrname);