[PATCH] security: Use VIR_DEBUG instead of VIR_INFO in virSecurityDACSetOwnershipInternal

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

 



virSecurityDACSetOwnershipInternal was called by libvirt child process,
so if we log message by VIR_INFO at normal scene, it would probability occurs dead lock sence,
then libvirtd will also by dead lock because libvirtd is waitting for child message.
so our suggest is use VIR_DEBUG instead of VIR_INFO to avoid this sence.
---
 src/security/security_dac.c | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/src/security/security_dac.c b/src/security/security_dac.c
index ca7a6af..7bfd090 100644
--- a/src/security/security_dac.c
+++ b/src/security/security_dac.c
@@ -552,8 +552,8 @@ virSecurityDACSetOwnershipInternal(const virSecurityDACData *priv,
     else if (rc > 0)
         return 0;
 
-    VIR_INFO("Setting DAC user and group on '%s' to '%ld:%ld'",
-             NULLSTR(src ? src->path : path), (long) uid, (long) gid);
+    VIR_DEBUG("Setting DAC user and group on '%s' to '%ld:%ld'",
+              NULLSTR(src ? src->path : path), (long) uid, (long) gid);
 
     if (priv && src && priv->chownCallback) {
         rc = priv->chownCallback(src, uid, gid);
@@ -591,17 +591,17 @@ virSecurityDACSetOwnershipInternal(const virSecurityDACData *priv,
 
     if (rc < 0) {
         if (errno == EOPNOTSUPP || errno == EINVAL) {
-            VIR_INFO("Setting user and group to '%ld:%ld' on '%s' not "
-                     "supported by filesystem",
-                     (long) uid, (long) gid, path);
+            VIR_DEBUG("Setting user and group to '%ld:%ld' on '%s' not "
+                      "supported by filesystem",
+                      (long) uid, (long) gid, path);
         } else if (errno == EPERM) {
-            VIR_INFO("Setting user and group to '%ld:%ld' on '%s' not "
-                     "permitted",
-                     (long) uid, (long) gid, path);
+            VIR_DEBUG("Setting user and group to '%ld:%ld' on '%s' not "
+                      "permitted",
+                      (long) uid, (long) gid, path);
         } else if (errno == EROFS) {
-            VIR_INFO("Setting user and group to '%ld:%ld' on '%s' not "
-                     "possible on readonly filesystem",
-                     (long) uid, (long) gid, path);
+            VIR_DEBUG("Setting user and group to '%ld:%ld' on '%s' not "
+                      "possible on readonly filesystem",
+                      (long) uid, (long) gid, path);
         } else {
             virReportSystemError(errno,
                                  _("unable to set user and group to '%ld:%ld' "
-- 
2.8.3


--
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]
  Powered by Linux