On 06/18/2013 05:07 PM, Jan Cholasta wrote:
On 12.6.2013 11:46, Pavel Březina wrote:
>> + 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.
Fixed.
>
>> + } 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.
>
Sure, fixed.
Updated and rebased patches attached.
Honza
I acked this patch a while ago, but I accidentally sent it only to Honza.
So ACK.