summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorDaniel P. Berrange <berrange@redhat.com>2012-09-19 14:00:34 +0100
committerDaniel P. Berrange <berrange@redhat.com>2013-01-14 13:40:04 +0000
commit907a39e735d256b8428ed4c77009d1f713aea19b (patch)
tree6315baa531ea88deafbd15f3319dd0e4ce550612 /m4
parentcf7ac00ebd99c2817644cfb73fe5f41a9606725a (diff)
downloadlibvirt-907a39e735d256b8428ed4c77009d1f713aea19b.tar.gz
Add a test suite for validating SELinux labelling
There are many aspects of the guest XML which result in the SELinux driver applying file labelling. With the increasing configuration options it is desirable to test this behaviour. It is not possible to assume that the test suite has the ability to set SELinux labels. Most filesystems though will support extended attributes. Thus for the purpose of testing, it is possible to extend the existing LD_PRELOAD hack to override setfilecon() and getfilecon() to simply use the 'user.libvirt.selinux' attribute for the sake of testing. Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Diffstat (limited to 'm4')
-rw-r--r--m4/virt-attr.m49
1 files changed, 9 insertions, 0 deletions
diff --git a/m4/virt-attr.m4 b/m4/virt-attr.m4
new file mode 100644
index 0000000000..341b35b98a
--- /dev/null
+++ b/m4/virt-attr.m4
@@ -0,0 +1,9 @@
+dnl The libattr.so library
+
+AC_DEFUN([LIBVIRT_CHECK_ATTR],[
+ LIBVIRT_CHECK_LIB([ATTR], [attr], [getxattr], [attr/xattr.h])
+])
+
+AC_DEFUN([LIBVIRT_RESULT_ATTR],[
+ LIBVIRT_RESULT_LIB([ATTR])
+])