[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH 2/1] selinux: enhance test to cover nfs label failure

On 08/20/2013 04:58 PM, Jim Fehlig wrote:
> Eric Blake wrote:
>> Daniel Berrange (correctly) pointed out that we should do a better
>> job of testing selinux labeling fallbacks on NFS disks that lack
>> labeling support.
> FYI, this is causing a build failure on a host without libattr-devel
> make[2]: Entering directory `/home/jfehlig/virt/upstream/libvirt/tests'
>   CCLD     libshunload.la
>   CC       securityselinuxhelper.lo
> securityselinuxhelper.c:34:24: fatal error: attr/xattr.h: No such file
> or directory
> compilation terminated.
> make[2]: *** [securityselinuxhelper.lo] Error 1

>> +/* This file is only compiled on Linux, and only if xattr support was
>> + * detected. */
>> +
>> +#include <dlfcn.h>
>> +#include <errno.h>
>> +#include <linux/magic.h>
>>  #include <selinux/selinux.h>
>> +#include <stdio.h>
>>  #include <stdlib.h>
>>  #include <string.h>
>> +#include <sys/vfs.h>
>>  #include <unistd.h>
>> -#include <errno.h>
>> -#if WITH_ATTR
>> -# include <attr/xattr.h>
>> -#endif
>> +#include <attr/xattr.h>

Bummer - that means the makefile is not correctly avoiding the build of
this file when attr/xattr.h does not exist.  I don't know where the
disconnect is between WITH_ATTR in the config.h setup, vs. WITH_ATTR as
the automake variable used in tests/Makefile.am.  I'm also out of time
today, but if you don't beat me to it, I'll have a fix tomorrow.

Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]