[SSSD] [PATCHES] SSH: When host is removed from LDAP remove it from the, cache as well

Pavel Březina pbrezina at redhat.com
Wed Jun 12 09:46:18 UTC 2013


On 05/27/2013 05:19 PM, Jan Cholasta wrote:
> Hi,
>
> the attached patches fix <https://fedorahosted.org/sssd/ticket/1949>.
>
> Honza

Hi,

> +    if (state->count != 1) {
> +        ret = sysdb_delete_ssh_host(state->domain->sysdb, state->domain,
> +                                    state->name);
> +        if (ret != EOK && ret != ENOENT) {
> +            goto done;
> +        }
> +
> +        if (state->count == 0) {
> +            DEBUG(SSSDBG_CRIT_FAILURE,
> +                  ("No host with name [%s] found.\n", state->name));

This is not a critical failure.

> +        } else {
> +            DEBUG(SSSDBG_CRIT_FAILURE,
> +                  ("Found more than one host with name [%s].\n", state->name));
> +        }

Shouldn't we keep the host in sysdb if state->count > 1? This is not 
normal condition, but an error. I think we should not modify sysdb on error.




More information about the sssd-devel mailing list