From: Pavel Hrdina Date: Thu, 15 Apr 2021 18:46:53 +0000 (+0200) Subject: virfirewall: use virFindFileInPath instead of virFileIsExecutable X-Git-Tag: v7.3.0-rc1~115 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=25a8c0ef389353bf31e7d21f1ca8d2cf6e4acb22;p=thirdparty%2Flibvirt.git virfirewall: use virFindFileInPath instead of virFileIsExecutable Following patches will make this change necessary as we will stop detecting the full path during compile time. Signed-off-by: Pavel Hrdina Reviewed-by: Daniel P. Berrangé --- diff --git a/src/util/virfirewall.c b/src/util/virfirewall.c index 78aa7e580e..e79fe52ac8 100644 --- a/src/util/virfirewall.c +++ b/src/util/virfirewall.c @@ -104,7 +104,9 @@ virFirewallValidateBackend(virFirewallBackend backend) size_t i; for (i = 0; i < G_N_ELEMENTS(commands); i++) { - if (!virFileIsExecutable(commands[i])) { + g_autofree char *path = virFindFileInPath(commands[i]); + + if (!path) { virReportSystemError(errno, _("%s not available, firewall backend will not function"), commands[i]);