]> 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, 23 Jan 2013 16:12:10 +0000 (09:12 -0700)
https://bugzilla.redhat.com/show_bug.cgi?id=903184

Commit id f8ab364c removed ability to run this driver unprivileged. Coverity
detected the check and flagged it.
(cherry picked from commit aafe41971cc3f4a189edf5b322f399aabd869d74)

Conflicts:
src/nwfilter/nwfilter_driver.c - whitespace changes in 1c04f99 not present

src/nwfilter/nwfilter_driver.c

index dda6da7d79802f6f56360e0282e77e513c3e3cf8..17a9e57117d138c47d9670695ec324f985d19c4d 100644 (file)
@@ -218,14 +218,8 @@ nwfilterDriverStartup(int privileged)
         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)