Dne 24.9.2012 15:03, Pavel Březina napsal(a):
On 09/19/2012 12:09 PM, Jan Cholasta wrote:
> Hi,
>
> this patch set changes the way the known_hosts file is updated so that
> only entries for hosts that were requested recently (in the last 5
> minutes) are written to the file. There is no need to keep older entries
> in the file, as host keys are needed only before the connection to the
> host is established (which usually takes just a few seconds).
>
> The individual patches are:
>
> [PATCH 1/3] DB: Add function for deleting values from sysdb_attrs
Nack.
Can you make new copy of attrs without the deleted attributes instead of
touching the original attrs?
Sure.
> [PATCH 2/3] SSH: Refactor sysdb code
Nack.
sysdb_update_ssh_host(), sysdb_store_ssh_host():
Is there any advantage to allow the input attrs parameter to be NULL?
Currently there is no code flow how this could happened (except sysdb
test) so I would simply prohibit it and make the code simpler.
I believe that was a copy & paste from some other sysdb function, you
are probably right that it can be safely removed.
sysdb_update_ssh_host():
What is the purpose of deleting OC and NAME attributes and then adding
them again?
ldb complains when the same value is present more than once in a single
attribute (such as name) and refuses to store the entry.
> [PATCH 3/3] SSH: Expire hosts in known_hosts
Ack.
Honza
--
Jan Cholasta