[libvirt PATCH 14/31] m4: virt-secdriver-selinux: drop obsolete function checks

Ján Tomko jtomko at redhat.com
Thu Jul 9 15:00:39 UTC 2020


On a Thursday in 2020, Pavel Hrdina wrote:
>All of the listed functions are available in libselinux version 2.2.
>Our supported OSes start with version 2.5 so there is no need to check
>it.
>
>Signed-off-by: Pavel Hrdina <phrdina at redhat.com>
>---
> m4/virt-secdriver-selinux.m4 | 24 ++----------------------
> 1 file changed, 2 insertions(+), 22 deletions(-)

This doesn't look right with no changes to the SELinux driver.

>
>diff --git a/m4/virt-secdriver-selinux.m4 b/m4/virt-secdriver-selinux.m4
>index a48569fc33a..4174249a510 100644
>--- a/m4/virt-secdriver-selinux.m4
>+++ b/m4/virt-secdriver-selinux.m4
>@@ -32,28 +32,8 @@ AC_DEFUN([LIBVIRT_SECDRIVER_CHECK_SELINUX], [
>       AC_MSG_ERROR([You must install the libselinux development package and enable SELinux with the --with-selinux=yes in order to compile libvirt --with-secdriver-selinux=yes])
>     fi
>   elif test "$with_secdriver_selinux" != "no"; then
>-    old_CFLAGS="$CFLAGS"
>-    old_LIBS="$LIBS"
>-    CFLAGS="$CFLAGS $SELINUX_CFLAGS"
>-    LIBS="$CFLAGS $SELINUX_LIBS"
>-
>-    fail=0
>-    AC_CHECK_FUNC([selinux_virtual_domain_context_path], [], [fail=1])
>-    AC_CHECK_FUNC([selinux_virtual_image_context_path], [], [fail=1])
>-    AC_CHECK_FUNCS([selinux_lxc_contexts_path])

This means the code relying on HAVE_SELINUX_LXC_CONTEXTS_PATH will no
longer be compiled.

Jano

>-    CFLAGS="$old_CFLAGS"
>-    LIBS="$old_LIBS"
>-
>-    if test "$fail" = "1" ; then
>-      if test "$with_secdriver_selinux" = "check" ; then
>-        with_secdriver_selinux=no
>-      else
>-        AC_MSG_ERROR([You must install libselinux development package >= 2.0.82 in order to compile libvirt --with-secdriver-selinux=yes])
>-      fi
>-    else
>-      with_secdriver_selinux=yes
>-      AC_DEFINE_UNQUOTED([WITH_SECDRIVER_SELINUX], 1, [whether SELinux security driver is available])
>-    fi
>+    with_secdriver_selinux=yes
>+    AC_DEFINE_UNQUOTED([WITH_SECDRIVER_SELINUX], 1, [whether SELinux security driver is available])
>   fi
>   AM_CONDITIONAL([WITH_SECDRIVER_SELINUX], [test "$with_secdriver_selinux" != "no"])
> ])
>-- 
>2.26.2
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20200709/d3850e27/attachment-0001.sig>


More information about the libvir-list mailing list