{ { "rlimit_nproc", required_argument, NULL, 0x0206 }, "RLIMIT_NPROC, 'max' or 'hard' for the current hard limit, 'def' or 'soft' for the current soft limit, 'inf' for RLIM64_INFINITY (default: 'soft')" },
{ { "rlimit_stack", required_argument, NULL, 0x0207 }, "RLIMIT_STACK in MB, 'max' or 'hard' for the current hard limit, 'def' or 'soft' for the current soft limit, 'inf' for RLIM64_INFINITY (default: 'soft')" },
{ { "rlimit_memlock", required_argument, NULL, 0x0209 }, "RLIMIT_MEMLOCK in KB, 'max' or 'hard' for the current hard limit, 'def' or 'soft' for the current soft limit, 'inf' for RLIM64_INFINITY (default: 'soft')" },
- { { "rlimit_rtprio", required_argument, NULL, 0x0210 }, "RLIMIT_RTPRIO, 'max' or 'hard' for the current hard limit, 'def' or 'soft' for the current soft limit, 'inf' for RLIM64_INFINITY (default: 0)" },
- { { "rlimit_msgqueue", required_argument, NULL, 0x0211 }, "RLIMIT_MSGQUEUE in bytes, 'max' or 'hard' for the current hard limit, 'def' or 'soft' for the current soft limit, 'inf' for RLIM64_INFINITY (default: 128)" },
+ { { "rlimit_rtprio", required_argument, NULL, 0x0210 }, "RLIMIT_RTPRIO, 'max' or 'hard' for the current hard limit, 'def' or 'soft' for the current soft limit, 'inf' for RLIM64_INFINITY (default: 'soft')" },
+ { { "rlimit_msgqueue", required_argument, NULL, 0x0211 }, "RLIMIT_MSGQUEUE in bytes, 'max' or 'hard' for the current hard limit, 'def' or 'soft' for the current soft limit, 'inf' for RLIM64_INFINITY (default: 'soft')" },
{ { "disable_rlimits", no_argument, NULL, 0x0208 }, "Disable all rlimits, default to limits set by parent" },
{ { "persona_addr_compat_layout", no_argument, NULL, 0x0301 }, "personality(ADDR_COMPAT_LAYOUT)" },
{ { "persona_mmap_page_zero", no_argument, NULL, 0x0302 }, "personality(MMAP_PAGE_ZERO)" },
nsjconf->rl_nproc = parseRLimit(RLIMIT_NPROC, "soft", 1);
nsjconf->rl_stack = parseRLimit(RLIMIT_STACK, "soft", 1);
nsjconf->rl_mlock = parseRLimit(RLIMIT_MEMLOCK, "soft", 1);
- nsjconf->rl_rtpr = 0;
- nsjconf->rl_msgq = 1024ULL;
+ nsjconf->rl_rtpr = parseRLimit(RLIMIT_RTPRIO, "soft", 1);
+ nsjconf->rl_msgq = parseRLimit(RLIMIT_MSGQUEUE, "soft", 1);
nsjconf->disable_rl = false;
nsjconf->personality = 0;
nsjconf->clone_newnet = true;
optional uint64 rlimit_memlock = 88 [default = 64];
optional RLimit rlimit_memlock_type = 89 [default = SOFT];
optional uint64 rlimit_rtprio = 90 [default = 0];
- optional RLimit rlimit_rtprio_type = 91 [default = VALUE];
- optional uint64 rlimit_msgqueue = 92 [default = 1024];
- optional RLimit rlimit_msgqueue_type = 93 [default = VALUE];
+ optional RLimit rlimit_rtprio_type = 91 [default = SOFT];
+ optional uint64 rlimit_msgqueue = 92 [default = 1024]; /* In bytes */
+ optional RLimit rlimit_msgqueue_type = 93 [default = SOFT];
/* Disable all rlimits, default to limits set by parent */
optional bool disable_rl = 84 [default = false];