26bb6d7 virt-aa-helper: generate rules for passthrough input devices

Authored and Committed by Christian Ehrhardt 6 years ago
    virt-aa-helper: generate rules for passthrough input devices
    
    Input devices can passthrough an event device. This currently works only via
    hotplug where the AppArmor label is created via the domain label callbacks.
    
    This adds the virt-aa-helper support for passthrough input devices to generate
    rules for the needed paths from the initial guest definition as well.
    
    Example in domain xml:
      <input type='passthrough' bus='virtio'>
              <source evdev='/dev/input/event0' />
      </input>
    Works to start now and creates:
      "/dev/input/event0" rw,
    
    Fixes: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1757085
    
    Acked-by: Jamie Strandboge <jamie@canonical.com>
    Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
    
        
file modified
+3 -0