]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
daemon: Clear fake domain def object that is used to check ACL prior to use
authorPeter Krempa <pkrempa@redhat.com>
Wed, 25 Mar 2015 07:52:26 +0000 (08:52 +0100)
committerCole Robinson <crobinso@redhat.com>
Mon, 27 Apr 2015 23:51:26 +0000 (19:51 -0400)
The fake object is used to pass the domain name and UUID to the ACL code
for events where we don't have the full domain def when dispatching
events. The rest of the entries would be left uninitialized. While this
is not a problem code-wise as the used fields are initialized it looks
ugly in the debugger.

(cherry picked from commit 6ca857c7c8a1f7b571132d6c7fff5a06301a5e9a)

daemon/remote.c

index fa5e9f5e2a114485998a9aa3f6322f3f547b31c4..a0c16a271802ad9e63a6560c004b52f97677d645 100644 (file)
@@ -150,6 +150,7 @@ remoteRelayDomainEventCheckACL(virNetServerClientPtr client,
     /* For now, we just create a virDomainDef with enough contents to
      * satisfy what viraccessdriverpolkit.c references.  This is a bit
      * fragile, but I don't know of anything better.  */
+    memset(&def, 0, sizeof(def));
     def.name = dom->name;
     memcpy(def.uuid, dom->uuid, VIR_UUID_BUFLEN);