summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2011-02-17 14:33:50 -0500
committerStephen Gallagher <sgallagh@redhat.com>2011-02-18 16:30:59 -0500
commitecb98fdf587e435c8e498e2e585e89f3fb8b2f35 (patch)
tree200242e2fa0c5ff9780d11fda9c95bca6f86803e /src
parent44ca4ec72b85c875b91842084834c25b144adf0c (diff)
downloadsssd-ecb98fdf587e435c8e498e2e585e89f3fb8b2f35.tar.gz
sssd-ecb98fdf587e435c8e498e2e585e89f3fb8b2f35.tar.bz2
sssd-ecb98fdf587e435c8e498e2e585e89f3fb8b2f35.zip
Remove cached user entry if initgroups returns ENOENT
This behavior was present for getpwnam() but was lacking for initgroups.
Diffstat (limited to 'src')
-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 09f0026b..9a234280 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);
}