[PATCH 2/3] nwfilter: Remove unprivileged code path to set base

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

 



Commit id f8ab364c removed ability to run this driver unprivileged. Coverity
detected the check and flagged it.
---
 src/nwfilter/nwfilter_driver.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/src/nwfilter/nwfilter_driver.c b/src/nwfilter/nwfilter_driver.c
index 1ac91cf..815f588 100644
--- a/src/nwfilter/nwfilter_driver.c
+++ b/src/nwfilter/nwfilter_driver.c
@@ -219,14 +219,8 @@ nwfilterDriverStartup(bool privileged ATTRIBUTE_UNUSED,
         goto error;
     }
 
-    if (privileged) {
-        if ((base = strdup(SYSCONFDIR "/libvirt")) == NULL)
-            goto out_of_memory;
-    } else {
-        base = virGetUserConfigDirectory();
-        if (!base)
-            goto error;
-    }
+    if ((base = strdup(SYSCONFDIR "/libvirt")) == NULL)
+        goto out_of_memory;
 
     if (virAsprintf(&driverState->configDir,
                     "%s/nwfilter", base) == -1)
-- 
1.7.11.7

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[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]