Skip to content

Commit

Permalink
Add CRIU unprivileged mode to server script
Browse files Browse the repository at this point in the history
Introduce the CRIU_EXTRA_ARGS env var to allow the user to
pass extra arguments to `criu restore`.

Introduce the CRIU_UNPRIVILEGED env var to allow the user to
control/override whether CRIU is invoked in privileged or unprivileged
mode.

Check whether CRIU supports unprivileged mode by looking for
"--unprivileged" in the output of `criu --help`.

If the script is invoked as root or CRIU doesn't support unprivileged
mode or CRIU_UNPRIVILEGED is false, invoke CRIU in privileged mode.

If the script is invoked as non-root and CRIU supports unprivileged
mode, or CRIU_UNPRIVILEGED is true, invoke CRIU in unprivileged mode.

Signed-off-by: Younes Manton <[email protected]>
  • Loading branch information
ymanton committed Apr 7, 2022
1 parent d8198f2 commit e13f8f8
Showing 1 changed file with 118 additions and 74 deletions.
Loading

0 comments on commit e13f8f8

Please sign in to comment.