if (pid == -1) {
auto saved_errno = errno;
PLOG_W("clone(flags=%s) failed", cloneFlagsToStr(flags).c_str());
- if (flags & CLONE_NEWCGROUP) {
- LOG_W(
- "nsjail tried to use the CLONE_NEWCGROUP clone flag, which is "
- "supported under kernel versions >= 4.6 only");
- } else if (flags & CLONE_NEWTIME) {
- LOG_W(
- "nsjail tried to use the CLONE_NEWTIME clone flag, which is "
- "supported under kernel versions >= 5.13 only");
- }
close(parent_fd);
errno = saved_errno;
return pid;
return -1;
}
+ if (flags & CLONE_NEWTIME) {
+ LOG_W(
+ "CLONE_NEWTIME reuqested, but it's only supported with the unshare() mode "
+ "(-Me)");
+ }
+
#if defined(__NR_clone3)
struct clone_args ca = {
.flags = (uint64_t)flags,