[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH 04/13] 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>
---
 src/parallels/parallels_storage.c |   22 +++-------------------
 1 files changed, 3 insertions(+), 19 deletions(-)

diff --git a/src/parallels/parallels_storage.c b/src/parallels/parallels_storage.c
index 0453de3..bb6327f 100644
--- a/src/parallels/parallels_storage.c
+++ b/src/parallels/parallels_storage.c
@@ -118,28 +118,12 @@ static int parallelsLoadPools(virConnectPtr conn)
 {
     parallelsConnPtr privconn = conn->privateData;
     virStorageDriverStatePtr storageState = conn->storagePrivateData;
-    int privileged = (geteuid() == 0);
     char *base = NULL;
 
-    if (privileged) {
-        if ((base = strdup(SYSCONFDIR "/libvirt")) == NULL)
-            goto out_of_memory;
-    } else {
-        char *userdir = virGetUserDirectory();
-
-        if (!userdir)
-            goto error;
-
-        if (virAsprintf(&base, "%s/.libvirt", userdir) == -1) {
-            VIR_FREE(userdir);
-            goto out_of_memory;
-        }
-        VIR_FREE(userdir);
-    }
+    if ((base = strdup(SYSCONFDIR "/libvirt")) == NULL)
+        goto out_of_memory;
 
-    /* Configuration paths are either ~/.libvirt/storage/... (session) or
-     * /etc/libvirt/storage/... (system).
-     */
+    /* Configuration path is /etc/libvirt/parallels-storage/... . */
     if (virAsprintf(&storageState->configDir,
                     "%s/parallels-storage", base) == -1)
         goto out_of_memory;
-- 
1.7.1


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]