]> git.ipfire.org Git - thirdparty/libvirt.git/commit
security, apparmor: add (Set|Restore)InputLabel
authorChristian Ehrhardt <christian.ehrhardt@canonical.com>
Mon, 19 Mar 2018 13:48:39 +0000 (14:48 +0100)
committerChristian Ehrhardt <christian.ehrhardt@canonical.com>
Thu, 22 Mar 2018 08:42:01 +0000 (09:42 +0100)
commit943c1fd9b670547e4ea7fcd2ef45e487fbdb1f41
tree39dd323e3263453876f5cded0a97a7411ea08026
parent999998a7920c11a3c8969bba6e32714ea810508c
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 <jamie@canonical.com>
Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
src/security/security_apparmor.c