Skip to content

Commit

Permalink
Allow mmap2() again
Browse files Browse the repository at this point in the history
The previous patch allowed mmap(), because it may be needed by malloc().
It makes sense to allow mmap2() as well.
  • Loading branch information
eafer committed May 30, 2021
1 parent 8a8868b commit 444ce3d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/sandbox.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ static void do_start_sandbox(void)
fail |= seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(exit_group), 0);
fail |= seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(close), 0);
fail |= seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(mmap), 0);
fail |= seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(mmap2), 0);
fail |= seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(munmap), 0);

fail |= seccomp_load(ctx);
Expand Down

0 comments on commit 444ce3d

Please sign in to comment.