[libvirt PATCH v2 06/21] virfirewall: use virFindFileInPath instead of virFileIsExecutable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Following patches will make this change necessary as we will stop
detecting the full path during compile time.

Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx>
---
 src/util/virfirewall.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

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]);
-- 
2.30.2




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux