diff options
Diffstat (limited to 'src/providers')
-rw-r--r-- | src/providers/ldap/ldap_id.c | 8 | ||||
-rw-r--r-- | src/providers/ldap/ldap_id_cleanup.c | 2 | ||||
-rw-r--r-- | src/providers/proxy/proxy_id.c | 20 |
3 files changed, 18 insertions, 12 deletions
diff --git a/src/providers/ldap/ldap_id.c b/src/providers/ldap/ldap_id.c index 1a4689061..95455d01b 100644 --- a/src/providers/ldap/ldap_id.c +++ b/src/providers/ldap/ldap_id.c @@ -256,7 +256,8 @@ static void users_get_done(struct tevent_req *subreq) tevent_req_error(req, ret); return; case BE_FILTER_NAME: - ret = sysdb_delete_user(state->sysdb, state->name, 0); + ret = sysdb_delete_user(state->sysdb, + state->domain, state->name, 0); if (ret != EOK && ret != ENOENT) { tevent_req_error(req, ret); return; @@ -270,7 +271,7 @@ static void users_get_done(struct tevent_req *subreq) return; } - ret = sysdb_delete_user(state->sysdb, NULL, uid); + ret = sysdb_delete_user(state->sysdb, state->domain, NULL, uid); if (ret != EOK && ret != ENOENT) { tevent_req_error(req, ret); return; @@ -732,7 +733,8 @@ static void groups_by_user_done(struct tevent_req *subreq) } if (ret == ENOENT) { - ret = sysdb_delete_user(state->ctx->be->sysdb, state->name, 0); + ret = sysdb_delete_user(state->ctx->be->sysdb, + state->ctx->be->domain, state->name, 0); if (ret != EOK && ret != ENOENT) { tevent_req_error(req, ret); return; diff --git a/src/providers/ldap/ldap_id_cleanup.c b/src/providers/ldap/ldap_id_cleanup.c index 6e138b31b..77c4d94ee 100644 --- a/src/providers/ldap/ldap_id_cleanup.c +++ b/src/providers/ldap/ldap_id_cleanup.c @@ -337,7 +337,7 @@ static int cleanup_users(TALLOC_CTX *memctx, struct sdap_id_ctx *ctx) /* If not logged in or cannot check the table, delete him */ DEBUG(9, ("About to delete user %s\n", name)); - ret = sysdb_delete_user(sysdb, name, 0); + ret = sysdb_delete_user(sysdb, ctx->be->domain, name, 0); if (ret) { goto done; } diff --git a/src/providers/proxy/proxy_id.c b/src/providers/proxy/proxy_id.c index 256377830..4ce00b4f4 100644 --- a/src/providers/proxy/proxy_id.c +++ b/src/providers/proxy/proxy_id.c @@ -36,7 +36,9 @@ handle_getpw_result(enum nss_status status, struct passwd *pwd, struct sss_domain_info *dom, bool *del_user); static int -delete_user(struct sysdb_ctx *sysdb, const char *name, uid_t uid); +delete_user(struct sysdb_ctx *sysdb, + struct sss_domain_info *domain, + const char *name, uid_t uid); static int get_pw_name(TALLOC_CTX *mem_ctx, struct proxy_id_ctx *ctx, @@ -86,7 +88,7 @@ static int get_pw_name(TALLOC_CTX *mem_ctx, } if (del_user) { - ret = delete_user(sysdb, name, 0); + ret = delete_user(sysdb, dom, name, 0); goto done; } @@ -126,7 +128,7 @@ static int get_pw_name(TALLOC_CTX *mem_ctx, } if (del_user) { - ret = delete_user(sysdb, name, uid); + ret = delete_user(sysdb, dom, name, uid); goto done; } @@ -195,14 +197,16 @@ handle_getpw_result(enum nss_status status, struct passwd *pwd, } static int -delete_user(struct sysdb_ctx *sysdb, const char *name, uid_t uid) +delete_user(struct sysdb_ctx *sysdb, + struct sss_domain_info *domain, + const char *name, uid_t uid) { int ret = EOK; DEBUG(SSSDBG_TRACE_FUNC, ("User %s does not exist (or is invalid) on remote server," " deleting!\n", name)); - ret = sysdb_delete_user(sysdb, name, uid); + ret = sysdb_delete_user(sysdb, domain, name, uid); if (ret == ENOENT) { ret = EOK; } @@ -332,7 +336,7 @@ static int get_pw_uid(TALLOC_CTX *mem_ctx, } if (del_user) { - ret = delete_user(sysdb, NULL, uid); + ret = delete_user(sysdb, dom, NULL, uid); goto done; } @@ -1172,7 +1176,7 @@ static int get_initgr(TALLOC_CTX *mem_ctx, } if (del_user) { - ret = delete_user(sysdb, name, 0); + ret = delete_user(sysdb, dom, name, 0); if (ret) { DEBUG(SSSDBG_OP_FAILURE, ("Could not delete user\n")); goto fail; @@ -1216,7 +1220,7 @@ static int get_initgr(TALLOC_CTX *mem_ctx, } if (del_user) { - ret = delete_user(sysdb, name, uid); + ret = delete_user(sysdb, dom, name, uid); if (ret) { DEBUG(SSSDBG_OP_FAILURE, ("Could not delete user\n")); goto fail; |