From aafe41971cc3f4a189edf5b322f399aabd869d74 Mon Sep 17 00:00:00 2001 From: John Ferlan Date: Tue, 8 Jan 2013 16:21:50 -0500 Subject: [PATCH] nwfilter: Remove unprivileged code path to set base 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 1ac91cf00f..815f588c77 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)