projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
686d9ba
)
execute: be a little less drastic when MemoryDenyWriteExecute= hits
author
Lennart Poettering
<lennart@poettering.net>
Wed, 22 Jun 2016 23:35:04 +0000
(
01:35
+0200)
committer
Lennart Poettering
<lennart@poettering.net>
Wed, 22 Jun 2016 23:35:04 +0000
(
01:35
+0200)
Let's politely refuse with EPERM rather than kill the whole thing right-away.
src/core/execute.c
patch
|
blob
|
history
diff --git
a/src/core/execute.c
b/src/core/execute.c
index
135e567
..
cf52355
100644
(file)
--- a/
src/core/execute.c
+++ b/
src/core/execute.c
@@
-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));