Michal Privoznik b9dcaede65 virsh: cmdSetUserSSHKeys: Error early if the file doesn't contain any keys
When removing SSH keys via set-user-sshkeys virsh command, then
files to remove are read from passed file. But when
experimenting, I've passed /dev/null as the file which resulted
in API checks which caught that @keys argument of
virDomainAuthorizedSSHKeysSet() can't be NULL. This is because if
the file is empty then its content is an empty string and thus
the buffer the file was read in to is not NULL.

Long story short, error is reported correctly, but it's not
necessary to go through public API to catch it.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2020-12-08 14:39:13 +01:00
..
2020-09-01 13:22:24 +02:00
2019-08-09 09:03:53 +02:00
2020-08-03 15:30:40 +02:00
2019-06-19 17:12:34 +02:00
2020-11-13 11:12:29 +01:00