summaryrefslogtreecommitdiff
path: root/src/providers
diff options
context:
space:
mode:
Diffstat (limited to 'src/providers')
-rw-r--r--src/providers/ipa/ipa_id.c2
-rw-r--r--src/providers/ldap/ldap_id_netgroup.c2
-rw-r--r--src/providers/proxy/proxy_netgroup.c12
3 files changed, 8 insertions, 8 deletions
diff --git a/src/providers/ipa/ipa_id.c b/src/providers/ipa/ipa_id.c
index afe0a636..a44874e0 100644
--- a/src/providers/ipa/ipa_id.c
+++ b/src/providers/ipa/ipa_id.c
@@ -292,7 +292,7 @@ static void ipa_id_get_netgroup_done(struct tevent_req *subreq)
}
if (ret == ENOENT) {
- ret = sysdb_delete_netgroup(state->sysdb, state->name);
+ ret = sysdb_delete_netgroup(state->sysdb, state->domain, state->name);
if (ret != EOK && ret != ENOENT) {
tevent_req_error(req, ret);
return;
diff --git a/src/providers/ldap/ldap_id_netgroup.c b/src/providers/ldap/ldap_id_netgroup.c
index 58a9a346..4e2ae4c8 100644
--- a/src/providers/ldap/ldap_id_netgroup.c
+++ b/src/providers/ldap/ldap_id_netgroup.c
@@ -204,7 +204,7 @@ static void ldap_netgroup_get_done(struct tevent_req *subreq)
}
if (ret == ENOENT) {
- ret = sysdb_delete_netgroup(state->sysdb, state->name);
+ ret = sysdb_delete_netgroup(state->sysdb, state->domain, state->name);
if (ret != EOK && ret != ENOENT) {
tevent_req_error(req, ret);
return;
diff --git a/src/providers/proxy/proxy_netgroup.c b/src/providers/proxy/proxy_netgroup.c
index 5dc8efe7..04a0b18d 100644
--- a/src/providers/proxy/proxy_netgroup.c
+++ b/src/providers/proxy/proxy_netgroup.c
@@ -101,8 +101,8 @@ static errno_t save_netgroup(struct sysdb_ctx *sysdb,
return EOK;
}
-static errno_t handle_error(enum nss_status status,
- struct sysdb_ctx *sysdb, const char *name)
+static errno_t handle_error(enum nss_status status, struct sysdb_ctx *sysdb,
+ struct sss_domain_info *domain, const char *name)
{
errno_t ret;
@@ -114,7 +114,7 @@ static errno_t handle_error(enum nss_status status,
case NSS_STATUS_NOTFOUND:
DEBUG(SSSDBG_MINOR_FAILURE, ("The netgroup was not found\n"));
- ret = sysdb_delete_netgroup(sysdb, name);
+ ret = sysdb_delete_netgroup(sysdb, domain, name);
if (ret != EOK) {
DEBUG(SSSDBG_CRIT_FAILURE, ("Cannot delete netgroup: %d\n", ret));
ret = EIO;
@@ -153,7 +153,7 @@ errno_t get_netgroup(struct proxy_id_ctx *ctx,
if (status != NSS_STATUS_SUCCESS) {
DEBUG(SSSDBG_OP_FAILURE,
("setnetgrent failed for netgroup [%s].\n", name));
- ret = handle_error(status, sysdb, name);
+ ret = handle_error(status, sysdb, dom, name);
goto done;
}
@@ -176,7 +176,7 @@ errno_t get_netgroup(struct proxy_id_ctx *ctx,
if (status != NSS_STATUS_SUCCESS &&
status != NSS_STATUS_RETURN &&
status != NSS_STATUS_NOTFOUND) {
- ret = handle_error(status, sysdb, name);
+ ret = handle_error(status, sysdb, dom, name);
DEBUG(SSSDBG_OP_FAILURE,
("getnetgrent_r failed for netgroup [%s]: [%d][%s].\n",
name, ret, strerror(ret)));
@@ -195,7 +195,7 @@ errno_t get_netgroup(struct proxy_id_ctx *ctx,
status = ctx->ops.endnetgrent(&result);
if (status != NSS_STATUS_SUCCESS) {
DEBUG(SSSDBG_OP_FAILURE, ("endnetgrent failed.\n"));
- ret = handle_error(status, sysdb, name);
+ ret = handle_error(status, sysdb, dom, name);
goto done;
}