mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-05 04:25:19 +00:00
m4: virt-selinux: drop check for selabel_open signature change
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>
This commit is contained in:
parent
121d980bbb
commit
f3b0261e1c
@ -27,23 +27,6 @@ AC_DEFUN([LIBVIRT_CHECK_SELINUX],[
|
|||||||
[fgetfilecon_raw], [selinux/selinux.h])
|
[fgetfilecon_raw], [selinux/selinux.h])
|
||||||
|
|
||||||
if test "$with_selinux" = "yes"; then
|
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])
|
AC_MSG_CHECKING([SELinux mount point])
|
||||||
if test "$with_selinux_mount" = "check" || test -z "$with_selinux_mount"; then
|
if test "$with_selinux_mount" = "check" || test -z "$with_selinux_mount"; then
|
||||||
if test -d /sys/fs/selinux ; then
|
if test -d /sys/fs/selinux ; then
|
||||||
|
@ -53,8 +53,7 @@ static const char *(*real_selinux_lxc_contexts_path)(void);
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
static struct selabel_handle *(*real_selabel_open)(unsigned int backend,
|
static struct selabel_handle *(*real_selabel_open)(unsigned int backend,
|
||||||
VIR_SELINUX_OPEN_CONST
|
const struct selinux_opt *opts,
|
||||||
struct selinux_opt *opts,
|
|
||||||
unsigned nopts);
|
unsigned nopts);
|
||||||
static void (*real_selabel_close)(struct selabel_handle *handle);
|
static void (*real_selabel_close)(struct selabel_handle *handle);
|
||||||
static int (*real_selabel_lookup_raw)(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 *
|
struct selabel_handle *
|
||||||
selabel_open(unsigned int backend,
|
selabel_open(unsigned int backend,
|
||||||
VIR_SELINUX_OPEN_CONST struct selinux_opt *opts,
|
const struct selinux_opt *opts,
|
||||||
unsigned nopts)
|
unsigned nopts)
|
||||||
{
|
{
|
||||||
char *fake_handle;
|
char *fake_handle;
|
||||||
|
Loading…
Reference in New Issue
Block a user