mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-02-04 17:47:03 +03:00
execute: be a little less drastic when MemoryDenyWriteExecute= hits
Let's politely refuse with EPERM rather than kill the whole thing right-away.
This commit is contained in:
parent
686d9ba614
commit
abd84d4d83
@ -1237,7 +1237,7 @@ static int apply_memory_deny_write_execute(const ExecContext *c) {
|
||||
|
||||
r = seccomp_rule_add(
|
||||
seccomp,
|
||||
SCMP_ACT_KILL,
|
||||
SCMP_ACT_ERRNO(EPERM),
|
||||
SCMP_SYS(mmap),
|
||||
1,
|
||||
SCMP_A2(SCMP_CMP_MASKED_EQ, PROT_EXEC|PROT_WRITE, PROT_EXEC|PROT_WRITE));
|
||||
@ -1246,7 +1246,7 @@ static int apply_memory_deny_write_execute(const ExecContext *c) {
|
||||
|
||||
r = seccomp_rule_add(
|
||||
seccomp,
|
||||
SCMP_ACT_KILL,
|
||||
SCMP_ACT_ERRNO(EPERM),
|
||||
SCMP_SYS(mprotect),
|
||||
1,
|
||||
SCMP_A2(SCMP_CMP_MASKED_EQ, PROT_EXEC, PROT_EXEC));
|
||||
|
Loading…
x
Reference in New Issue
Block a user