mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
virtio-9p: Make infrastructure for the new security model.
This patch adds required infrastructure for the new security model. - A new configure option for attr/xattr. - if CONFIG_VIRTFS will be defined if both CONFIG_LINUX and CONFIG_ATTR defined. - Defines routines related to both security models. Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
9ce56db6f0
commit
758e8e38eb
8 changed files with 114 additions and 53 deletions
37
configure
vendored
37
configure
vendored
|
@ -270,6 +270,7 @@ vnc_tls=""
|
|||
vnc_sasl=""
|
||||
xen=""
|
||||
linux_aio=""
|
||||
attr=""
|
||||
vhost_net=""
|
||||
|
||||
gprof="no"
|
||||
|
@ -671,6 +672,10 @@ for opt do
|
|||
;;
|
||||
--enable-linux-aio) linux_aio="yes"
|
||||
;;
|
||||
--disable-attr) attr="no"
|
||||
;;
|
||||
--enable-attr) attr="yes"
|
||||
;;
|
||||
--enable-io-thread) io_thread="yes"
|
||||
;;
|
||||
--disable-blobs) blobs="no"
|
||||
|
@ -858,6 +863,8 @@ echo " --disable-vde disable support for vde network"
|
|||
echo " --enable-vde enable support for vde network"
|
||||
echo " --disable-linux-aio disable Linux AIO support"
|
||||
echo " --enable-linux-aio enable Linux AIO support"
|
||||
echo " --disable-attr disables attr and xattr support"
|
||||
echo " --enable-attr enable attr and xattr support"
|
||||
echo " --enable-io-thread enable IO thread"
|
||||
echo " --disable-blobs disable installing provided firmware blobs"
|
||||
echo " --kerneldir=PATH look for kernel includes in PATH"
|
||||
|
@ -1645,6 +1652,27 @@ EOF
|
|||
fi
|
||||
fi
|
||||
|
||||
##########################################
|
||||
# attr probe
|
||||
|
||||
if test "$attr" != "no" ; then
|
||||
cat > $TMPC <<EOF
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include <attr/xattr.h>
|
||||
int main(void) { getxattr(NULL, NULL, NULL, 0); setxattr(NULL, NULL, NULL, 0, 0); return 0; }
|
||||
EOF
|
||||
if compile_prog "" "-lattr" ; then
|
||||
attr=yes
|
||||
LIBS="-lattr $LIBS"
|
||||
else
|
||||
if test "$attr" = "yes" ; then
|
||||
feature_not_found "ATTR"
|
||||
fi
|
||||
attr=no
|
||||
fi
|
||||
fi
|
||||
|
||||
##########################################
|
||||
# iovec probe
|
||||
cat > $TMPC <<EOF
|
||||
|
@ -2079,6 +2107,7 @@ echo "PIE user targets $user_pie"
|
|||
echo "vde support $vde"
|
||||
echo "IO thread $io_thread"
|
||||
echo "Linux AIO support $linux_aio"
|
||||
echo "ATTR/XATTR support $attr"
|
||||
echo "Install blobs $blobs"
|
||||
echo "KVM support $kvm"
|
||||
echo "fdt support $fdt"
|
||||
|
@ -2280,6 +2309,14 @@ fi
|
|||
if test "$linux_aio" = "yes" ; then
|
||||
echo "CONFIG_LINUX_AIO=y" >> $config_host_mak
|
||||
fi
|
||||
if test "$attr" = "yes" ; then
|
||||
echo "CONFIG_ATTR=y" >> $config_host_mak
|
||||
fi
|
||||
if test "$linux" = "yes" ; then
|
||||
if test "$attr" = "yes" ; then
|
||||
echo "CONFIG_VIRTFS=y" >> $config_host_mak
|
||||
fi
|
||||
fi
|
||||
if test "$blobs" = "yes" ; then
|
||||
echo "INSTALL_BLOBS=yes" >> $config_host_mak
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue