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

[libvirt] Fix umask on error path in qemudListenUnix



Hi,
Attached patch makes sure we reset the umask in qemudListenUnix on the
error path.
O.k. to apply?
 -- Guido
>From 10c0088ca1ee55a2e44802f1f0185d7a8be907ee Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx sigxcpu org>
Date: Wed, 9 Mar 2011 14:19:56 +0100
Subject: [PATCH] Fix umask on error path

---
 daemon/libvirtd.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/daemon/libvirtd.c b/daemon/libvirtd.c
index 9a5a53e..1e41feb 100644
--- a/daemon/libvirtd.c
+++ b/daemon/libvirtd.c
@@ -603,6 +603,7 @@ static int qemudListenUnix(struct qemud_server *server,
     if (bind(sock->fd, &sock->addr.data.sa, sock->addr.len) < 0) {
         VIR_ERROR(_("Failed to bind socket to '%s': %s"),
                   path, virStrerror(errno, ebuf, sizeof ebuf));
+        umask(oldmask);
         goto cleanup;
     }
     umask(oldmask);
-- 
1.7.4.1


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