From 7b1f8721183647546e0da1aa458c02495f84a995 Mon Sep 17 00:00:00 2001 From: Jan Cholasta Date: Mon, 27 May 2013 17:09:59 +0200 Subject: SSH: When host is removed from LDAP, remove it from the cache as well https://fedorahosted.org/sssd/ticket/1949 --- src/providers/ipa/ipa_hostid.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/providers/ipa/ipa_hostid.c b/src/providers/ipa/ipa_hostid.c index a697dbf66..7afe350a8 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; } -- cgit