Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 40ecb9ab authored by Justin Yun's avatar Justin Yun
Browse files

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
parent 277a95bf
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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
+2 −2
Original line number Diff line number Diff line
@@ -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
+2 −0
Original line number Diff line number Diff line
@@ -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
+2 −2
Original line number Diff line number Diff line
@@ -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
+2 −2
Original line number Diff line number Diff line
@@ -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