X-Git-Url: https://git.wh0rd.org/?p=home.git;a=blobdiff_plain;f=vunshare.c;h=96fe7a35b677a3b24c6d7baae6222160591730d6;hp=2e7efbbb85415fe15ad637e1baebf6576476d6ed;hb=HEAD;hpb=2b4610c75ec8fbb0ea9b77107dd77869833ef0fe diff --git a/vunshare.c b/vunshare.c index 2e7efbb..96fe7a3 100644 --- a/vunshare.c +++ b/vunshare.c @@ -4,7 +4,6 @@ */ /* TODO: - * - Add userns support. * - Make pidns init optional. * - Make setproctitle nicer and include program argv[0]. * - Set up prctl(PR_SET_PDEATHSIG). @@ -195,7 +194,7 @@ static void setup_signal_handler(pid_t pid) child_pid = pid; - for (i = 1; i < SIGUNUSED; ++i) + for (i = 1; i < SIGRTMIN; ++i) if (sigaction(i, &sa, NULL) && errno != EINVAL) fprintf(stderr, "sigaction(%i) failed: %s\n", i, strerror(errno)); for (i = SIGRTMIN; i <= SIGRTMAX; ++i) @@ -288,7 +287,18 @@ static const struct option opts[] = { static void usage(void) { - puts("Usage: unshare [options] "); + puts( + "Usage: unshare [options] \n" + "\n" + "Options: [DimnpuU]\n" + " -i Use IPC namespaces\n" + " -m Use mount namespaces\n" + " -n Use net namespaces\n" + " -p Use pid namespaces\n" + " -u Use UTS namespaces\n" + " -U Use user namespaces\n" + " -D Daemonize program" + ); exit(EX_USAGE); }