virt-aa-helper: resolve file symlinks
virt-aa-helper: resolve file symlinks

In a recent change b932ed69: "virt-aa-helper: resolve yet to be created
paths" several cases with symlinks in paths were fixed, but it regressed
cases where the file being last element of the path was the actual link.

In the case of the last element being the symlink realpath can (and shall)
be called on the full path that was passed.

Examples would be zfs/lvm block devices like:
 <disk type='block' device='disk'>
    <driver name='qemu' type='raw'/>
    <source dev='/dev/mapper/testlvm-testvol1'/>
    <target dev='vdd' bus='virtio'/>
 </disk>
With the target being:
 /dev/mapper/testlvm-testvol1 -> ../dm-0

That currently is rendered as
 "/dev/mapper/testlvm-testvol1" rwk,
but instead should be (and is with the fix):
 "/dev/dm-0" rwk,

Fixes: b932ed69: "virt-aa-helper: resolve yet to be created paths"
Fixes: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1756394

Signed-off-by: Christian Ehrhardt <48da28e2c2cd455d60e19b14c46925e20a3c5d5b@canonical.com>

crobinso/libvirt,andreabolognani/libvirt,olafhering/libvirt,jfehlig/libvirt,libvirt/libvirt,nertpinx/libvirt,andreabolognani/libvirt,eskultety/libvirt,zippy2/libvirt,andreabolognani/libvirt,fabianfreyer/libvirt,olafhering/libvirt,eskultety/libvirt,nertpinx/libvirt,jardasgit/libvirt,jfehlig/libvirt,zippy2/libvirt,crobinso/libvirt,olafhering/libvirt,zippy2/libvirt,fabianfreyer/libvirt,eskultety/libvirt,crobinso/libvirt,libvirt/libvirt,fabianfreyer/libvirt,jardasgit/libvirt,andreabolognani/libvirt,nertpinx/libvirt,andreabolognani/libvirt,eskultety/libvirt,libvirt/libvirt,jardasgit/libvirt,eskultety/libvirt,jfehlig/libvirt,fabianfreyer/libvirt,libvirt/libvirt,nertpinx/libvirt,jfehlig/libvirt,jardasgit/libvirt,crobinso/libvirt,nertpinx/libvirt,fabianfreyer/libvirt,olafhering/libvirt,jardasgit/libvirt,zippy2/libvirt