Commit Graph

5 Commits

Author SHA1 Message Date
Martin Kletzander
df09767773 Fix include for xattr.h
The proper file that should be included is `sys/xattr.h` as that comes from
`glibc` and not `attr/xattr.h` which ships with the `attr` utility.

We're most probably not the only ones because `attr/xattr.h` added a #warning to
their include resulting in the following compilation errors:

In file included from securityselinuxlabeltest.c:31:0:
/usr/include/attr/xattr.h:5:2: error: #warning "Please change your <attr/xattr.h> includes to <sys/xattr.h>" [-Werror=cpp]
 #warning "Please change your <attr/xattr.h> includes to <sys/xattr.h>"
  ^~~~~~~

In file included from securityselinuxhelper.c:37:0:
/usr/include/attr/xattr.h:5:2: error: #warning "Please change your <attr/xattr.h> includes to <sys/xattr.h>" [-Werror=cpp]
 #warning "Please change your <attr/xattr.h> includes to <sys/xattr.h>"
  ^~~~~~~

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2018-08-06 11:50:53 +02:00
Andrea Bolognani
e64f2fab92 m4/virt-arg: Rename LIBVIRT_ARG_WITH* macros
LIBVIRT_ARG_WITH_ALT is more generic than LIBVIRT_ARG_WITH, which
is tailored at switching features on and off.

Rename the macros according to their intended purpose, and add
some documentation to help developers pick between the two.
2016-12-22 15:20:05 +01:00
Pavel Hrdina
eeccee1870 m4/virt: introduce LIBVIRT_ARG_* macros for all library checks
Usage of AC_REQUIRE will mess with order how LIBVIRT_CHECK_* macros
are composed into configure.ac.  This ensures that the output of
configure --help is properly ordered and grouped into sections.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 15:39:37 +01:00
Pavel Hrdina
e03d43714a m4/virt-lib: move LIBVIRT_ARG_WITH out of LIBVIRT_CHECK_(LIB|LIB_ALT|PKG)
Following patch will update LIBVIRT_CHECK_(LIB|LIB_ALT|PKG) macros in
a way that you will be able to call a another macro as a fallback if
the first one fails.  To allow that, we need to move the
LIBVIRT_ARG_WITH out of those macro to not have two or more same lines
in output of "configure --help".

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 15:39:37 +01:00
Daniel P. Berrange
907a39e735 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>
2013-01-14 13:40:04 +00:00