diff options
author | Simo Sorce <simo@redhat.com> | 2013-01-07 23:27:51 -0500 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2013-01-15 10:53:02 +0100 |
commit | 3412d14d65490c32414e72ac20fe21bad53ceb45 (patch) | |
tree | e63253f040369cfe88fa37a40377704072a168f7 /src/providers/proxy | |
parent | 044868b388b4e47499f12a9105310b247bbe1ce2 (diff) | |
download | sssd-3412d14d65490c32414e72ac20fe21bad53ceb45.tar.gz sssd-3412d14d65490c32414e72ac20fe21bad53ceb45.tar.xz sssd-3412d14d65490c32414e72ac20fe21bad53ceb45.zip |
Add domain argument to sysdb_delete_user()
Also remove sysdb_delete_domuser()
Diffstat (limited to 'src/providers/proxy')
-rw-r--r-- | src/providers/proxy/proxy_id.c | 20 |
1 files changed, 12 insertions, 8 deletions
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; |