]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/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)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 25 Mar 2015 12:37:41 +0000 (13:37 +0100)
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.

daemon/remote.c

index ea7ae9485dd278f9056939149de3ce64f3b5d08f..9e28720937bed8cd5f6ef6bfa5c5822e86ae679c 100644 (file)
@@ -151,6 +151,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);