summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVicente Olivert Riera <Vincent.Riera@imgtec.com>2017-06-20 16:42:28 +0100
committerDarren Tucker <dtucker@dtucker.net>2018-03-08 13:03:06 +1100
commit45011511a09e03493568506ce32f4891a174a3bd (patch)
treeb7b1475746027155ee5b4876eafc8493653c53df
parent580086704c31de91dc7ba040a28e416bf1fefbca (diff)
configure.ac: properly set seccomp_audit_arch for MIPS64
Currently seccomp_audit_arch is set to AUDIT_ARCH_MIPS64 or AUDIT_ARCH_MIPSEL64 (depending on the endinness) when openssh is built for MIPS64. However, that's only valid for n64 ABI. The right macros for n32 ABI defined in seccomp.h are AUDIT_ARCH_MIPS64N32 and AUDIT_ARCH_MIPSEL64N32, for big and little endian respectively. Because of that an sshd built for MIPS64 n32 rejects connection attempts and the output of strace reveals that the problem is related to seccomp audit: [pid 194] prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, {len=57, filter=0x555d5da0}) = 0 [pid 194] write(7, "\0\0\0]\0\0\0\5\0\0\0Ulist_hostkey_types: "..., 97) = ? [pid 193] <... poll resumed> ) = 2 ([{fd=5, revents=POLLIN|POLLHUP}, {fd=6, revents=POLLHUP}]) [pid 194] +++ killed by SIGSYS +++ This patch fixes that problem by setting the right value to seccomp_audit_arch taking into account the MIPS64 ABI. Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
-rw-r--r--configure.ac18
1 files changed, 16 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 76a603d29..85c634c5b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -874,10 +874,24 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
874 seccomp_audit_arch=AUDIT_ARCH_MIPSEL 874 seccomp_audit_arch=AUDIT_ARCH_MIPSEL
875 ;; 875 ;;
876 mips64-*) 876 mips64-*)
877 seccomp_audit_arch=AUDIT_ARCH_MIPS64 877 case "$mips_abi" in
878 "n32")
879 seccomp_audit_arch=AUDIT_ARCH_MIPS64N32
880 ;;
881 "n64")
882 seccomp_audit_arch=AUDIT_ARCH_MIPS64
883 ;;
884 esac
878 ;; 885 ;;
879 mips64el-*) 886 mips64el-*)
880 seccomp_audit_arch=AUDIT_ARCH_MIPSEL64 887 case "$mips_abi" in
888 "n32")
889 seccomp_audit_arch=AUDIT_ARCH_MIPSEL64N32
890 ;;
891 "n64")
892 seccomp_audit_arch=AUDIT_ARCH_MIPSEL64
893 ;;
894 esac
881 ;; 895 ;;
882 esac 896 esac
883 if test "x$seccomp_audit_arch" != "x" ; then 897 if test "x$seccomp_audit_arch" != "x" ; then