Commit f87edfde authored by Dengguangxing's avatar Dengguangxing Committed by Pavel Emelyanov

add warning message when joining user namespace

join user namespace is not fully tested yet. So it is
not recommended to use this.

add a warning message when user tries to use join-ns with
user-namespace.
Signed-off-by: 's avatarDeng Guangxing <dengguangxing@huawei.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent 3bc62b36
......@@ -834,6 +834,8 @@ usage:
" --join-ns net:12345 or --join-ns net:/foo/bar.\n"
" Extra_opts is optional, for now only user namespace support:\n"
" --join-ns user:PID,UID,GID to specify uid and gid.\n"
" Please NOTE: join-ns with user-namespace is not fully tested.\n"
" It may be dangerous to use this feature\n"
"Check options:\n"
" without any arguments, \"criu check\" checks availability of absolutely required\n"
" kernel features; if any of these features is missing dump and restore will fail\n"
......
......@@ -48,6 +48,9 @@ int check_namespace_opts(void)
pr_perror("Conflict flags: -join-ns and -empty-ns");
return -1;
}
if (join_ns_flags & CLONE_NEWUSER)
pr_warn("join-ns with user-namespace is not fully tested and dangerous");
errno = 0;
return 0;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment