From: Guido Günther Date: Wed, 9 Mar 2011 13:19:56 +0000 (+0100) Subject: Make sure we reset the umask on the error path X-Git-Tag: CVE-2011-1146~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a236732ec311f0c80d7365362939878cc9fec3b2;p=thirdparty%2Flibvirt.git Make sure we reset the umask on the error path --- diff --git a/daemon/libvirtd.c b/daemon/libvirtd.c index 9a5a53e3e3..1e41feb1db 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);