]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
nwfilter: Remove unprivileged code path to set base
authorJohn Ferlan <jferlan@redhat.com>
Tue, 8 Jan 2013 21:21:50 +0000 (16:21 -0500)
committerEric Blake <eblake@redhat.com>
Wed, 9 Jan 2013 00:18:31 +0000 (17:18 -0700)
Commit id f8ab364c removed ability to run this driver unprivileged. Coverity
detected the check and flagged it.

src/nwfilter/nwfilter_driver.c

index 1ac91cf00f3a27d8ba1e18b3ddeffdd61ca15c29..815f588c779795afd86286dc2e7cd4bbf16e2484 100644 (file)
@@ -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)