qemuDomainGetImageIds: Skip <seclabel/> without label
qemuDomainGetImageIds: Skip <seclabel/> without label

It's easy to shed the daemon these days. With this XML snippet:

    <disk type='file' device='disk'>
      <driver name='qemu' type='raw'/>
      <source file='/some/dummy/path/test.bin'>
        <seclabel model='dac' relabel='no'/>
      </source>
      <target dev='vdb' bus='virtio'/>
      <readonly/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
    </disk>

I get the SIGSEGV when starting the domain. The thing is, when
starting a domain, we check for its disk presence. For some reason,
when determining the disk chain, we parse the <seclabel/> (don't ask
me why). However, there's no label attribute in the XML, so we end up
calling virParseOwnershipIds() over NULL string:

 [Switching to Thread 0x7ffff10c4700 (LWP 30956)]
 __strchr_sse42 () at ../sysdeps/x86_64/multiarch/strchr.S:136
 136     ../sysdeps/x86_64/multiarch/strchr.S: No such file or directory.
 (gdb) bt
 #0  __strchr_sse42 () at ../sysdeps/x86_64/multiarch/strchr.S:136
 #1  0x00007ffff749f800 in virParseOwnershipIds (label=0x0, uidPtr=uidPtr@entry=0x7ffff10c2df0, gidPtr=gidPtr@entry=0x7ffff10c2df4) at util/virutil.c:2115
 #2  0x00007fffe929f006 in qemuDomainGetImageIds (gid=0x7ffff10c2df4, uid=0x7ffff10c2df0, disk=0x7fffe40cb000, vm=0x7fffe40a6410, cfg=0x7fffe409ae00) at qemu/qemu_domain.c:2385
 #3  qemuDomainDetermineDiskChain (driver=driver@entry=0x7fffe40120e0, vm=vm@entry=0x7fffe40a6410, disk=disk@entry=0x7fffe40cb000, force=force@entry=false) at qemu/qemu_domain.c:2414
 #4  0x00007fffe929f128 in qemuDomainCheckDiskPresence (driver=driver@entry=0x7fffe40120e0, vm=vm@entry=0x7fffe40a6410, cold_boot=cold_boot@entry=true) at qemu/qemu_domain.c:2250
 #5  0x00007fffe92b6fc8 in qemuProcessStart (conn=conn@entry=0x7fffd4000b60, driver=driver@entry=0x7fffe40120e0, vm=vm@entry=0x7fffe40a6410, migrateFrom=migrateFrom@entry=0x0, stdin_fd=stdin_fd@entry=-1, stdin_path=stdin_path@entry=0x0, snapshot=snapshot@entry=0x0,
     vmop=vmop@entry=VIR_NETDEV_VPORT_PROFILE_OP_CREATE, flags=flags@entry=1) at qemu/qemu_process.c:3813
 #6  0x00007fffe93087e8 in qemuDomainObjStart (conn=0x7fffd4000b60, driver=driver@entry=0x7fffe40120e0, vm=vm@entry=0x7fffe40a6410, flags=flags@entry=0) at qemu/qemu_driver.c:6051
 #7  0x00007fffe9308e32 in qemuDomainCreateWithFlags (dom=0x7fffcc000d50, flags=0) at qemu/qemu_driver.c:6105
 #8  0x00007ffff753c5cc in virDomainCreate (domain=domain@entry=0x7fffcc000d50) at libvirt.c:8861

Signed-off-by: Michal Privoznik <83d82aaba2eed257f4814b0c239c260c4caaadf0@redhat.com>

zippy2/libvirt,rlaager/libvirt,jardasgit/libvirt,taget/libvirt,nertpinx/libvirt,jfehlig/libvirt,jardasgit/libvirt,olafhering/libvirt,VenkatDatta/libvirt,fabianfreyer/libvirt,andreabolognani/libvirt,crobinso/libvirt,elmarco/libvirt,olafhering/libvirt,datto/libvirt,agx/libvirt,shugaoye/libvirt,libvirt/libvirt,rlaager/libvirt,agx/libvirt,zippy2/libvirt,nertpinx/libvirt,eskultety/libvirt,olafhering/libvirt,rlaager/libvirt,rlaager/libvirt,shugaoye/libvirt,crobinso/libvirt,libvirt/libvirt,jardasgit/libvirt,elmarco/libvirt,nertpinx/libvirt,elmarco/libvirt,eskultety/libvirt,shugaoye/libvirt,nertpinx/libvirt,VenkatDatta/libvirt,zippy2/libvirt,datto/libvirt,taget/libvirt,agx/libvirt,andreabolognani/libvirt,eskultety/libvirt,taget/libvirt,fabianfreyer/libvirt,VenkatDatta/libvirt,taget/libvirt,fabianfreyer/libvirt,jfehlig/libvirt,agx/libvirt,eskultety/libvirt,andreabolognani/libvirt,andreabolognani/libvirt,fabianfreyer/libvirt,shugaoye/libvirt,taget/libvirt,libvirt/libvirt,nertpinx/libvirt,VenkatDatta/libvirt,zippy2/libvirt,datto/libvirt,libvirt/libvirt,jfehlig/libvirt,jardasgit/libvirt,andreabolognani/libvirt,shugaoye/libvirt,jardasgit/libvirt,eskultety/libvirt,VenkatDatta/libvirt,elmarco/libvirt,datto/libvirt,olafhering/libvirt,jfehlig/libvirt,fabianfreyer/libvirt,elmarco/libvirt,crobinso/libvirt,crobinso/libvirt,rlaager/libvirt,datto/libvirt,agx/libvirt