File libvirt-selinux-Use-raw-contexts-2.patch of Package libvirt

From 612af27dcf7fad43e47c0e2e6ac5b5f768c3b7ab Mon Sep 17 00:00:00 2001
Message-Id: <612af27dcf7fad43e47c0e2e6ac5b5f768c3b7ab.1350990680.git.jdenemar@redhat.com>
From: Martin Kletzander <mkletzan@redhat.com>
Date: Mon, 22 Oct 2012 19:51:20 +0800
Subject: [PATCH] selinux: Use raw contexts 2

BZ:https://bugzilla.redhat.com/show_bug.cgi?id=851981
(cherry picked from commit 6676c1fc8fb297de998f96862cbe2396355b2777)

In commit 9674f2c637114fa6ac0680fe5658a41a62bb34a8, I forgot to change
selabel_lookup with the other functions, so this one-liner does exactly
that.
---
 src/security/security_selinux.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/security/security_selinux.c b/src/security/security_selinux.c
index 5a78b16..ebed692 100644
--- a/src/security/security_selinux.c
+++ b/src/security/security_selinux.c
@@ -901,7 +901,7 @@ getContext(const char *newpath, mode_t mode, security_context_t *fcon)
     if (handle == NULL)
         return -1;
 
-    ret = selabel_lookup(handle, fcon, newpath, mode);
+    ret = selabel_lookup_raw(handle, fcon, newpath, mode);
     selabel_close(handle);
     return ret;
 #else
-- 
1.7.12.4

openSUSE Build Service is sponsored by