From 85d36f1469437018e1fe40861933ad2e7116e679 Mon Sep 17 00:00:00 2001 From: Balazs Gerofi Date: Tue, 31 Oct 2017 13:39:31 +0900 Subject: [PATCH] mcexec: check kernel version <= 3.10 for RHEL mcoverlayfs --- executer/user/mcexec.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/executer/user/mcexec.c b/executer/user/mcexec.c index 613390ad..2d0d50ef 100644 --- a/executer/user/mcexec.c +++ b/executer/user/mcexec.c @@ -148,17 +148,25 @@ char **__glob_argv = 0; #ifdef ENABLE_MCOVERLAYFS #undef ENABLE_MCOVERLAYFS -#ifndef RHEL_RELEASE_CODE + +// RedHat? +#ifdef RHEL_RELEASE_CODE + +#if LINUX_VERSION_CODE <= KERNEL_VERSION(3,10,0) +#define ENABLE_MCOVERLAYFS 1 +#else +#error "ERROR: your Linux kernel version on RHEL is not supported" +#endif // LINUX_VERSION_CODE <= KERNEL_VERSION(3,10,0) + +// Other distro? +#else #if LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0) && LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0) #define ENABLE_MCOVERLAYFS 1 #endif // LINUX_VERSION_CODE == 4.0 #if LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0) && LINUX_VERSION_CODE < KERNEL_VERSION(4,7,0) #define ENABLE_MCOVERLAYFS 1 #endif // LINUX_VERSION_CODE == 4.6 -#else -#if RHEL_RELEASE_CODE <= RHEL_RELEASE_VERSION(7,3) -#define ENABLE_MCOVERLAYFS 1 -#endif // RHEL_RELEASE_CODE <= 7.3 + #endif // RHEL_RELEASE_CODE #endif // ENABLE_MCOVERLAYFS