summaryrefslogtreecommitdiffstats
path: root/src/providers/ldap
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2011-02-17 14:33:50 -0500
committerStephen Gallagher <sgallagh@redhat.com>2011-02-19 09:50:42 -0500
commit33fca098b2ec5274de16ff4167bd5ada4c0753d8 (patch)
tree842f48b109c624a68bc5841668a2d0adf009234f /src/providers/ldap
parent5b22f746da2d3822bb418cd900dca9923286fa22 (diff)
downloadsssd-33fca098b2ec5274de16ff4167bd5ada4c0753d8.tar.gz
sssd-33fca098b2ec5274de16ff4167bd5ada4c0753d8.tar.xz
sssd-33fca098b2ec5274de16ff4167bd5ada4c0753d8.zip
Remove cached user entry if initgroups returns ENOENT
This behavior was present for getpwnam() but was lacking for initgroups.
Diffstat (limited to 'src/providers/ldap')
-rw-r--r--src/providers/ldap/ldap_id.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/providers/ldap/ldap_id.c b/src/providers/ldap/ldap_id.c
index 09f0026b0..9a2342800 100644
--- a/src/providers/ldap/ldap_id.c
+++ b/src/providers/ldap/ldap_id.c
@@ -631,6 +631,17 @@ static void groups_by_user_done(struct tevent_req *subreq)
return;
}
+ if (ret == ENOENT) {
+ ret = sysdb_delete_user(state,
+ state->ctx->be->sysdb,
+ state->ctx->be->domain,
+ state->name, 0);
+ if (ret != EOK && ret != ENOENT) {
+ tevent_req_error(req, ret);
+ return;
+ }
+ }
+
state->dp_error = DP_ERR_OK;
tevent_req_done(req);
}