Skip to content

Commit

Permalink
Require CAP_SYS_RESOURCE for restore (#16)
Browse files Browse the repository at this point in the history
While most of the settings set through prctl(PR_SET_MM, ...) have mainly
informative value, PR_SET_MM_BRK affects return value of brk syscall.
Some applications might behave incorrectly or crash when the syscall returns
unexpected value and does not allocate any memory, therefore it is not
safe to ignore the error.
  • Loading branch information
rvansa authored Mar 28, 2024
1 parent 3162e80 commit e7aefe4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions criu/pie/restorer.c
Original file line number Diff line number Diff line change
Expand Up @@ -1800,8 +1800,7 @@ long __export_restore_task(struct task_restore_args *args)
ret |= restore_self_exe_late(args);

if (ret) {
pr_warn("Ignoring restore_task error 1 %ld\n", ret);
ret = 0;
pr_warn("Failures above might be caused by missing CAP_SYS_RESOURCE\n");
}
} else {
if (ret)
Expand Down

0 comments on commit e7aefe4

Please sign in to comment.