Daniel P. Berrange 6f290666dc Fix parsing of SELinux ranges without a category
Normally libvirtd should run with a SELinux label

  system_u:system_r:virtd_t:s0-s0:c0.c1023

If a user manually runs libvirtd though, it is sometimes
possible to get into a situation where it is running

  system_u:system_r:init_t:s0

The SELinux security driver isn't expecting this and can't
parse the security label since it lacks the ':c0.c1023' part
causing it to complain

  internal error Cannot parse sensitivity level in s0

This updates the parser to cope with this, so if no category
is present, libvirtd will hardcode the equivalent of c0.c1023.

Now this won't work if SELinux is in Enforcing mode, but that's
not an issue, because the user can only get into this problem
if in Permissive mode. This means they can now start VMs in
Permissive mode without hitting that parsing error

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
(cherry picked from commit 1732c1c62997b9f5ce39e5eb4d1ef2f842af73e1)

Conflicts:
	src/security/security_selinux.c
2013-04-01 10:41:04 -04:00
..
2012-04-02 09:33:54 -06:00
2012-09-17 14:59:37 -04:00
2011-12-01 13:49:20 -07:00
2011-06-30 18:04:02 +01:00
2009-10-07 12:18:13 +02:00
2009-10-07 12:18:13 +02:00
2011-07-11 09:21:37 -06:00
2009-07-16 15:06:42 +02:00