summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJan Cholasta <jcholast@redhat.com>2013-05-27 17:09:59 +0200
committerJakub Hrozek <jhrozek@redhat.com>2013-06-27 19:02:50 +0200
commit7b1f8721183647546e0da1aa458c02495f84a995 (patch)
treef82aede0647ab016e9213e0f3860d930e943ca9e /src
parent144e7bad57748aaab395b9fb8ad136cdad864a00 (diff)
downloadsssd-7b1f8721183647546e0da1aa458c02495f84a995.tar.gz
sssd-7b1f8721183647546e0da1aa458c02495f84a995.tar.bz2
sssd-7b1f8721183647546e0da1aa458c02495f84a995.zip
SSH: When host is removed from LDAP, remove it from the cache as well
https://fedorahosted.org/sssd/ticket/1949
Diffstat (limited to 'src')
-rw-r--r--src/providers/ipa/ipa_hostid.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/providers/ipa/ipa_hostid.c b/src/providers/ipa/ipa_hostid.c
index a697dbf6..7afe350a 100644
--- a/src/providers/ipa/ipa_hostid.c
+++ b/src/providers/ipa/ipa_hostid.c
@@ -269,8 +269,15 @@ hosts_get_done(struct tevent_req *subreq)
}
if (state->count == 0) {
- DEBUG(SSSDBG_CRIT_FAILURE,
+ DEBUG(SSSDBG_OP_FAILURE,
("No host with name [%s] found.\n", state->name));
+
+ ret = sysdb_delete_ssh_host(state->domain->sysdb, state->domain,
+ state->name);
+ if (ret != EOK && ret != ENOENT) {
+ goto done;
+ }
+
ret = EINVAL;
goto done;
}