{ { "pass_fd", required_argument, NULL, 0x0505 }, "Don't close this FD before executing child (can be specified multiple times), by default: 0/1/2 are kept open" },
{ { "disable_no_new_privs", no_argument, NULL, 0x0507 }, "Don't set the prctl(NO_NEW_PRIVS, 1) (DANGEROUS)" },
{ { "cap", required_argument, NULL, 0x0509 }, "Retain this capability in local namespace (e.g. CAP_PTRACE). Can be specified multiple times" },
- { { "rlimit_as", required_argument, NULL, 0x0201 }, "RLIMIT_AS in MB, 'max' for RLIM_INFINITY, 'def' for the current value (default: 512)" },
- { { "rlimit_core", required_argument, NULL, 0x0202 }, "RLIMIT_CORE in MB, 'max' for RLIM_INFINITY, 'def' for the current value (default: 0)" },
- { { "rlimit_cpu", required_argument, NULL, 0x0203 }, "RLIMIT_CPU, 'max' for RLIM_INFINITY, 'def' for the current value (default: 600)" },
- { { "rlimit_fsize", required_argument, NULL, 0x0204 }, "RLIMIT_FSIZE in MB, 'max' for RLIM_INFINITY, 'def' for the current value (default: 1)" },
- { { "rlimit_nofile", required_argument, NULL, 0x0205 }, "RLIMIT_NOFILE, 'max' for RLIM_INFINITY, 'def' for the current value (default: 32)" },
- { { "rlimit_nproc", required_argument, NULL, 0x0206 }, "RLIMIT_NPROC, 'max' for RLIM_INFINITY, 'def' for the current value (default: 'def')" },
- { { "rlimit_stack", required_argument, NULL, 0x0207 }, "RLIMIT_STACK in MB, 'max' for RLIM_INFINITY, 'def' for the current value (default: 'def')" },
+ { { "rlimit_as", required_argument, NULL, 0x0201 }, "RLIMIT_AS in MB, 'max' for the current hard limit, 'def' for the current soft limit (default: 512)" },
+ { { "rlimit_core", required_argument, NULL, 0x0202 }, "RLIMIT_CORE in MB, 'max' for the current hard limit, 'def' for the current soft limit (default: 0)" },
+ { { "rlimit_cpu", required_argument, NULL, 0x0203 }, "RLIMIT_CPU, 'max' for the current hard limit, 'def' for the current soft limit (default: 600)" },
+ { { "rlimit_fsize", required_argument, NULL, 0x0204 }, "RLIMIT_FSIZE in MB, 'max' for the current hard limit, 'def' for the current soft limit (default: 1)" },
+ { { "rlimit_nofile", required_argument, NULL, 0x0205 }, "RLIMIT_NOFILE, 'max' for the current hard limit, 'def' for the current soft limit (default: 32)" },
+ { { "rlimit_nproc", required_argument, NULL, 0x0206 }, "RLIMIT_NPROC, 'max' for the current hard limit, 'def' for the current soft limit (default: 'def')" },
+ { { "rlimit_stack", required_argument, NULL, 0x0207 }, "RLIMIT_STACK in MB, 'max' for the current hard limit, 'def' for the current soft limit (default: 'def')" },
{ { "persona_addr_compat_layout", no_argument, NULL, 0x0301 }, "personality(ADDR_COMPAT_LAYOUT)" },
{ { "persona_mmap_page_zero", no_argument, NULL, 0x0302 }, "personality(MMAP_PAGE_ZERO)" },
{ { "persona_read_implies_exec", no_argument, NULL, 0x0303 }, "personality(READ_IMPLIES_EXEC)" },
return rndX;
}
-#define VALSTR_STRUCT(x) \
- { \
- x, #x \
- }
+#define VALSTR_STRUCT(x) \
+ { \
+ x, #x \
+ }
const char *utilSigName(int signo)
{
static __thread char sigstr[32];
sigstr[0] = '\0';
- /* *INDENT-OFF* */
- static struct {
- const int signo;
- const char* const name;
- } const sigNames[] = {
- VALSTR_STRUCT(SIGINT),
- VALSTR_STRUCT(SIGILL),
- VALSTR_STRUCT(SIGABRT),
- VALSTR_STRUCT(SIGFPE),
- VALSTR_STRUCT(SIGSEGV),
- VALSTR_STRUCT(SIGTERM),
- VALSTR_STRUCT(SIGHUP),
- VALSTR_STRUCT(SIGQUIT),
- VALSTR_STRUCT(SIGTRAP),
- VALSTR_STRUCT(SIGKILL),
- VALSTR_STRUCT(SIGBUS),
- VALSTR_STRUCT(SIGSYS),
- VALSTR_STRUCT(SIGPIPE),
- VALSTR_STRUCT(SIGALRM),
- VALSTR_STRUCT(SIGURG),
- VALSTR_STRUCT(SIGSTOP),
- VALSTR_STRUCT(SIGTSTP),
- VALSTR_STRUCT(SIGCONT),
- VALSTR_STRUCT(SIGCHLD),
- VALSTR_STRUCT(SIGTTIN),
- VALSTR_STRUCT(SIGTTOU),
- VALSTR_STRUCT(SIGPOLL),
- VALSTR_STRUCT(SIGXCPU),
- VALSTR_STRUCT(SIGXFSZ),
- VALSTR_STRUCT(SIGVTALRM),
- VALSTR_STRUCT(SIGPROF),
- VALSTR_STRUCT(SIGUSR1),
- VALSTR_STRUCT(SIGUSR2),
- VALSTR_STRUCT(SIGWINCH),
- };
- /* *INDENT-ON* */
+ /* *INDENT-OFF* */
+ static struct {
+ const int signo;
+ const char* const name;
+ } const sigNames[] = {
+ VALSTR_STRUCT(SIGINT),
+ VALSTR_STRUCT(SIGILL),
+ VALSTR_STRUCT(SIGABRT),
+ VALSTR_STRUCT(SIGFPE),
+ VALSTR_STRUCT(SIGSEGV),
+ VALSTR_STRUCT(SIGTERM),
+ VALSTR_STRUCT(SIGHUP),
+ VALSTR_STRUCT(SIGQUIT),
+ VALSTR_STRUCT(SIGTRAP),
+ VALSTR_STRUCT(SIGKILL),
+ VALSTR_STRUCT(SIGBUS),
+ VALSTR_STRUCT(SIGSYS),
+ VALSTR_STRUCT(SIGPIPE),
+ VALSTR_STRUCT(SIGALRM),
+ VALSTR_STRUCT(SIGURG),
+ VALSTR_STRUCT(SIGSTOP),
+ VALSTR_STRUCT(SIGTSTP),
+ VALSTR_STRUCT(SIGCONT),
+ VALSTR_STRUCT(SIGCHLD),
+ VALSTR_STRUCT(SIGTTIN),
+ VALSTR_STRUCT(SIGTTOU),
+ VALSTR_STRUCT(SIGPOLL),
+ VALSTR_STRUCT(SIGXCPU),
+ VALSTR_STRUCT(SIGXFSZ),
+ VALSTR_STRUCT(SIGVTALRM),
+ VALSTR_STRUCT(SIGPROF),
+ VALSTR_STRUCT(SIGUSR1),
+ VALSTR_STRUCT(SIGUSR2),
+ VALSTR_STRUCT(SIGWINCH),
+ };
+ /* *INDENT-ON* */
for (size_t i = 0; i < ARRAYSIZE(sigNames); i++) {
if (signo == sigNames[i].signo) {