]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
m4: virt-selinux: drop check for selabel_open signature change
authorPavel Hrdina <phrdina@redhat.com>
Tue, 23 Jun 2020 22:28:55 +0000 (00:28 +0200)
committerPavel Hrdina <phrdina@redhat.com>
Fri, 10 Jul 2020 07:40:27 +0000 (09:40 +0200)
All supported OSes have at least libselinux version 2.5 so it's safe
to drop this check.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
m4/virt-selinux.m4
tests/securityselinuxhelper.c

index 64e69808440207d990aa76fcd192e1e4d5e6b7a0..fb541e207edfe12d5ac3d50fcb5d19d98cf052aa 100644 (file)
@@ -27,23 +27,6 @@ AC_DEFUN([LIBVIRT_CHECK_SELINUX],[
                     [fgetfilecon_raw], [selinux/selinux.h])
 
   if test "$with_selinux" = "yes"; then
-    # libselinux changed signatures for 2.5
-    # TODO: Drop once we don't support Ubuntu 16.04
-    AC_CACHE_CHECK([for selinux selabel_open parameter type],
-                   [lv_cv_selabel_open_const],
-    [AC_COMPILE_IFELSE(
-      [AC_LANG_PROGRAM(
-         [[
-#include <selinux/selinux.h>
-#include <selinux/label.h>
-struct selabel_handle *selabel_open(unsigned, struct selinux_opt *, unsigned);
-         ]])],
-         [lv_cv_selabel_open_const=''],
-         [lv_cv_selabel_open_const='const'])])
-    AC_DEFINE_UNQUOTED([VIR_SELINUX_OPEN_CONST], [$lv_cv_selabel_open_const],
-      [Define to empty or 'const' depending on how SELinux qualifies its
-       selabel_open parameter])
-
     AC_MSG_CHECKING([SELinux mount point])
     if test "$with_selinux_mount" = "check" || test -z "$with_selinux_mount"; then
       if test -d /sys/fs/selinux ; then
index f89224c07a48d2524fe04ea8de36180124864cb0..0556241fd55dd871493df7ce25bf52bc1be21a65 100644 (file)
@@ -53,8 +53,7 @@ static const char *(*real_selinux_lxc_contexts_path)(void);
 #endif
 
 static struct selabel_handle *(*real_selabel_open)(unsigned int backend,
-                                                  VIR_SELINUX_OPEN_CONST
-                                                  struct selinux_opt *opts,
+                                                  const struct selinux_opt *opts,
                                                   unsigned nopts);
 static void (*real_selabel_close)(struct selabel_handle *handle);
 static int (*real_selabel_lookup_raw)(struct selabel_handle *handle,
@@ -288,7 +287,7 @@ const char *selinux_lxc_contexts_path(void)
 
 struct selabel_handle *
 selabel_open(unsigned int backend,
-             VIR_SELINUX_OPEN_CONST struct selinux_opt *opts,
+             const struct selinux_opt *opts,
              unsigned nopts)
 {
     char *fake_handle;