nwfilter: Remove unprivileged code path to set base

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
This commit is contained in:
John Ferlan 2013-01-08 16:21:50 -05:00 committed by Eric Blake
parent ba4e7b6344
commit c52667e241

View File

@ -218,14 +218,8 @@ nwfilterDriverStartup(int privileged)
goto error; goto error;
} }
if (privileged) { if ((base = strdup(SYSCONFDIR "/libvirt")) == NULL)
if ((base = strdup (SYSCONFDIR "/libvirt")) == NULL) goto out_of_memory;
goto out_of_memory;
} else {
base = virGetUserConfigDirectory();
if (!base)
goto error;
}
if (virAsprintf(&driverState->configDir, if (virAsprintf(&driverState->configDir,
"%s/nwfilter", base) == -1) "%s/nwfilter", base) == -1)