]> git.ipfire.org Git - thirdparty/libvirt.git/commit
util: pidfile: Sanitize return values of virPidFileReadPathIfAlive
authorPeter Krempa <pkrempa@redhat.com>
Wed, 13 Nov 2019 12:08:58 +0000 (13:08 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 14 Nov 2019 11:42:10 +0000 (12:42 +0100)
commitf95ef9248a614329c2d5950b6b16d877bd89f2cf
treec1ea41d7d8662e1e5e189b80586929c061454f70
parentb13e45911d24c9e46dab67a3f95f85c45918e1b9
util: pidfile: Sanitize return values of virPidFileReadPathIfAlive

The callers don't actually use the returned errno for reporting errors.

Additionally virFileResolveAllLinks returns -1 rather than -errno on
error thus you'd get a spurious EPERM even on other errors.

Don't try to return errno in this case.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/util/virpidfile.c