From 40ecb9abf2b02f5d1fe571719c566457c56d7cfe Mon Sep 17 00:00:00 2001
From: Justin Yun
Date: Mon, 19 Feb 2018 10:42:42 +0900
Subject: Define PROT_READ and PROT_WRITE when generating the policy files

When generating crash_dump.*.policy, replace PROT_READ and PROT_WRITE
to numeric constants to make the policy backward compatible with old
libminijail.so.

Bug: 73273658
Test: use the new policy in OMR1 devices
Change-Id: I936a733340ad4df8aef6562c03eb10c29ffdada2
---
 debuggerd/seccomp_policy/crash_dump.policy.def | 2 ++
 1 file changed, 2 insertions(+)

(limited to 'debuggerd/seccomp_policy/crash_dump.policy.def')

diff --git a/debuggerd/seccomp_policy/crash_dump.policy.def b/debuggerd/seccomp_policy/crash_dump.policy.def
index b78c94a2b..9190ed749 100644
--- a/debuggerd/seccomp_policy/crash_dump.policy.def
+++ b/debuggerd/seccomp_policy/crash_dump.policy.def
@@ -33,6 +33,8 @@ rt_sigaction: 1
 rt_tgsigqueueinfo: 1
 
 #define PR_SET_VMA 0x53564d41
+#define PROT_READ 0x1
+#define PROT_WRITE 0x2
 prctl: arg0 == PR_GET_NO_NEW_PRIVS || arg0 == PR_SET_VMA
 
 madvise: 1
-- 
cgit v1.2.3-54-g00ecf

