1
0
Fork 0
mirror of https://gitlab.com/niansa/libhss.git synced 2025-03-06 20:49:21 +01:00

Corrected brk() behavior

This commit is contained in:
Nils 2021-07-22 14:49:30 +02:00
parent 48556bbd49
commit 6ba8a57087

View file

@ -48,7 +48,7 @@ void enable_limits(const Limits& limits) {
}) { }) {
seccomp_rule_add(ctx, SCMP_ACT_ALLOW, sysc, 0); seccomp_rule_add(ctx, SCMP_ACT_ALLOW, sysc, 0);
} }
seccomp_rule_add(ctx, SCMP_ACT_KILL, SCMP_SYS(write), 0); seccomp_rule_add(ctx, SCMP_ACT_ERRNO(ENOMEM), SCMP_SYS(brk), 0);
if (seccomp_load(ctx) < 0) { if (seccomp_load(ctx) < 0) {
throw std::runtime_error("Error setting up seccomp"); throw std::runtime_error("Error setting up seccomp");
} }