From: Christian Brauner Date: Thu, 24 May 2018 14:24:59 +0000 (+0200) Subject: seccomp: get_hostarch() X-Git-Tag: lxc-3.1.0~291^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0197fe2e5e505f37f9464fba5fa62511949a94ce;p=thirdparty%2Flxc.git seccomp: get_hostarch() Signed-off-by: Christian Brauner --- diff --git a/src/lxc/seccomp.c b/src/lxc/seccomp.c index 8a418a66e..3a1cacb63 100644 --- a/src/lxc/seccomp.c +++ b/src/lxc/seccomp.c @@ -309,6 +309,7 @@ int get_hostarch(void) SYSERROR("Failed to read host arch"); return -1; } + if (strcmp(uts.machine, "i686") == 0) return lxc_seccomp_arch_i386; /* no x32 kernels */ @@ -330,6 +331,7 @@ int get_hostarch(void) return MIPS_ARCH_O32; else if (strncmp(uts.machine, "s390x", 5) == 0) return lxc_seccomp_arch_s390x; + return lxc_seccomp_arch_unknown; }