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
This commit is contained in:
Justin Yun 2018-02-19 10:42:42 +09:00
parent 277a95bfef
commit 40ecb9abf2
5 changed files with 10 additions and 8 deletions

View File

@ -26,11 +26,11 @@ rt_sigaction: 1
rt_tgsigqueueinfo: 1
prctl: arg0 == PR_GET_NO_NEW_PRIVS || arg0 == 0x53564d41
madvise: 1
mprotect: arg2 in PROT_READ|PROT_WRITE
mprotect: arg2 in 0x1|0x2
munmap: 1
getuid32: 1
fstat64: 1
mmap2: arg2 in PROT_READ|PROT_WRITE
mmap2: arg2 in 0x1|0x2
geteuid32: 1
getgid32: 1
getegid32: 1

View File

@ -25,11 +25,11 @@ rt_sigaction: 1
rt_tgsigqueueinfo: 1
prctl: arg0 == PR_GET_NO_NEW_PRIVS || arg0 == 0x53564d41
madvise: 1
mprotect: arg2 in PROT_READ|PROT_WRITE
mprotect: arg2 in 0x1|0x2
munmap: 1
getuid: 1
fstat: 1
mmap: arg2 in PROT_READ|PROT_WRITE
mmap: arg2 in 0x1|0x2
geteuid: 1
getgid: 1
getegid: 1

View File

@ -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

View File

@ -26,11 +26,11 @@ rt_sigaction: 1
rt_tgsigqueueinfo: 1
prctl: arg0 == PR_GET_NO_NEW_PRIVS || arg0 == 0x53564d41
madvise: 1
mprotect: arg2 in PROT_READ|PROT_WRITE
mprotect: arg2 in 0x1|0x2
munmap: 1
getuid32: 1
fstat64: 1
mmap2: arg2 in PROT_READ|PROT_WRITE
mmap2: arg2 in 0x1|0x2
geteuid32: 1
getgid32: 1
getegid32: 1

View File

@ -25,11 +25,11 @@ rt_sigaction: 1
rt_tgsigqueueinfo: 1
prctl: arg0 == PR_GET_NO_NEW_PRIVS || arg0 == 0x53564d41
madvise: 1
mprotect: arg2 in PROT_READ|PROT_WRITE
mprotect: arg2 in 0x1|0x2
munmap: 1
getuid: 1
fstat: 1
mmap: arg2 in PROT_READ|PROT_WRITE
mmap: arg2 in 0x1|0x2
geteuid: 1
getgid: 1
getegid: 1