security, apparmor: add (Set|Restore)InputLabel
security, apparmor: add (Set|Restore)InputLabel

d8116b5a "security: Introduce functions for input device hot(un)plug"
implemented the code (Set|Restore)InputLabel for several security modules,
this patch adds an AppArmor implementation for it as well.

That fixes hot-plugging event input devices by generating a rule for the
path that needs to be accessed.

Example hot adding:
  <input type='passthrough' bus='virtio'>
     <source evdev='/dev/input/event0' />
  </input>
Creates now:
  "/dev/input/event0" rwk,

Fixes: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1755153

Acked-by: Jamie Strandboge <b4dde37aa2aac745c0e6c43447507eaeace3e59f@canonical.com>
Signed-off-by: Christian Ehrhardt <48da28e2c2cd455d60e19b14c46925e20a3c5d5b@canonical.com>

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