[PATCH] storage: backend: Log uid/gid when initializing storage file backend

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

 



To ease debugging permission problems add uid/gid values to the debug
message when initializing a storage file backend.
---
 src/storage/storage_backend_fs.c      | 4 ++--
 src/storage/storage_backend_gluster.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/storage/storage_backend_fs.c b/src/storage/storage_backend_fs.c
index 0ee1d09..b831268 100644
--- a/src/storage/storage_backend_fs.c
+++ b/src/storage/storage_backend_fs.c
@@ -1370,9 +1370,9 @@ virStorageFileBackendFileInit(virStorageSourcePtr src)
 {
     virStorageFileBackendFsPrivPtr priv = NULL;

-    VIR_DEBUG("initializing FS storage file %p (%s:%s)", src,
+    VIR_DEBUG("initializing FS storage file %p (%s:%s[%u:%u])", src,
               virStorageTypeToString(virStorageSourceGetActualType(src)),
-              src->path);
+              src->path, src->drv->uid, src->drv->gid);

     if (VIR_ALLOC(priv) < 0)
         return -1;
diff --git a/src/storage/storage_backend_gluster.c b/src/storage/storage_backend_gluster.c
index b79b634..9d7b0f5 100644
--- a/src/storage/storage_backend_gluster.c
+++ b/src/storage/storage_backend_gluster.c
@@ -582,9 +582,9 @@ virStorageFileBackendGlusterInit(virStorageSourcePtr src)

     hostname = host->name;

-    VIR_DEBUG("initializing gluster storage file %p (gluster://%s:%s/%s%s)",
+    VIR_DEBUG("initializing gluster storage file %p (gluster://%s:%s/%s%s)[%u:%u]",
               src, hostname, host->port ? host->port : "0",
-              NULLSTR(src->volume), src->path);
+              NULLSTR(src->volume), src->path, src->drv->uid, src->drv->gid);

     if (!src->volume) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-- 
2.1.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]