mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-02 18:05:20 +00:00
parallels: remove unused code from storage driver
We don't support unprivileged users anymore, so remove code, which selects configuration directory depending on user. Signed-off-by: Dmitry Guryanov <dguryanov@parallels.com>
This commit is contained in:
parent
21e1bdeb3d
commit
4dc52e1e2f
@ -118,29 +118,13 @@ static int parallelsLoadPools(virConnectPtr conn)
|
|||||||
{
|
{
|
||||||
parallelsConnPtr privconn = conn->privateData;
|
parallelsConnPtr privconn = conn->privateData;
|
||||||
virStorageDriverStatePtr storageState = conn->storagePrivateData;
|
virStorageDriverStatePtr storageState = conn->storagePrivateData;
|
||||||
bool privileged = (geteuid() == 0);
|
|
||||||
char *base = NULL;
|
char *base = NULL;
|
||||||
size_t i;
|
size_t i;
|
||||||
|
|
||||||
if (privileged) {
|
if ((base = strdup(SYSCONFDIR "/libvirt")) == NULL)
|
||||||
if ((base = strdup(SYSCONFDIR "/libvirt")) == NULL)
|
goto out_of_memory;
|
||||||
goto out_of_memory;
|
|
||||||
} else {
|
|
||||||
char *userdir = virGetUserDirectory();
|
|
||||||
|
|
||||||
if (!userdir)
|
/* Configuration path is /etc/libvirt/parallels-storage/... . */
|
||||||
goto error;
|
|
||||||
|
|
||||||
if (virAsprintf(&base, "%s/.libvirt", userdir) == -1) {
|
|
||||||
VIR_FREE(userdir);
|
|
||||||
goto out_of_memory;
|
|
||||||
}
|
|
||||||
VIR_FREE(userdir);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Configuration paths are either ~/.libvirt/storage/... (session) or
|
|
||||||
* /etc/libvirt/storage/... (system).
|
|
||||||
*/
|
|
||||||
if (virAsprintf(&storageState->configDir,
|
if (virAsprintf(&storageState->configDir,
|
||||||
"%s/parallels-storage", base) == -1)
|
"%s/parallels-storage", base) == -1)
|
||||||
goto out_of_memory;
|
goto out_of_memory;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user