]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
privsep-linux: fix SECCOMP_AUDIT_ARCH missing ppc64le (#181)
authorCHEN Xiangyu <xiangyu.chen@aol.com>
Thu, 9 Feb 2023 10:41:52 +0000 (18:41 +0800)
committerGitHub <noreply@github.com>
Thu, 9 Feb 2023 10:41:52 +0000 (10:41 +0000)
when dhcpcd running on ppc64le platform, it would be killed by SIGSYS.

Signed-off-by: Xiangyu Chen <xiangyu.chen@windriver.com>
src/privsep-linux.c

index 7372d26b04f972ebb190ff786c557f8d9541f97e..6a3019505fe9c96f074193aeb5a9797f11196fb0 100644 (file)
@@ -232,7 +232,11 @@ ps_root_sendnetlink(struct dhcpcd_ctx *ctx, int protocol, struct msghdr *msg)
 #elif defined(__or1k__)
 #  define SECCOMP_AUDIT_ARCH AUDIT_ARCH_OPENRISC
 #elif defined(__powerpc64__)
-#  define SECCOMP_AUDIT_ARCH AUDIT_ARCH_PPC64
+#  if (BYTE_ORDER == LITTLE_ENDIAN)
+#    define SECCOMP_AUDIT_ARCH AUDIT_ARCH_PPC64LE
+#  else
+#    define SECCOMP_AUDIT_ARCH AUDIT_ARCH_PPC64
+#  endif
 #elif defined(__powerpc__)
 #  define SECCOMP_AUDIT_ARCH AUDIT_ARCH_PPC
 #elif defined(__riscv)