From 3a9241add947cb6d24b5de7a8927517426a78795 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Sat, 25 Aug 2012 14:25:22 -0500 Subject: Move commands into "posix", "lsb", and "other" menus/directories. --- toys/unshare.c | 45 --------------------------------------------- 1 file changed, 45 deletions(-) delete mode 100644 toys/unshare.c (limited to 'toys/unshare.c') diff --git a/toys/unshare.c b/toys/unshare.c deleted file mode 100644 index 1df9b758..00000000 --- a/toys/unshare.c +++ /dev/null @@ -1,45 +0,0 @@ -/* vi: set sw=4 ts=4: - * - * unshare.c - run command in new context - * - * Copyright 2011 Rob Landley - * - * Not in SUSv4. - -USE_UNSHARE(NEWTOY(unshare, "<1^nium", TOYFLAG_USR|TOYFLAG_BIN)) - -config UNSHARE - bool "unshare" - default y - depends on TOYBOX_CONTAINER - help - usage: unshare [-muin] COMMAND... - - Create new namespace(s) for this process and its children, so some - attribute is not shared with the parent process. This is part of - Linux Containers. Each process can have its own: - - -m Mount/unmount tree - -u Host and domain names - -i SysV IPC (message queues, semaphores, shared memory) - -n Network address, sockets, routing, iptables -*/ - -#include "toys.h" -#include -extern int unshare (int __flags); - -void unshare_main(void) -{ - unsigned flags[]={CLONE_NEWNS, CLONE_NEWUTS, CLONE_NEWIPC, CLONE_NEWNET,0}; - unsigned f=0; - int i; - - for (i=0; flags[i]; i++) - if (toys.optflags & (1<