Re: [PATCH] sys-tools: Add setns utility to sys-tools

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Dec 20, 2012 at 10:24:39AM +0100, Karel Zak wrote:
> On Wed, Dec 19, 2012 at 02:06:46PM -0500, Neil Horman wrote:
> > Like the unshare command, which lets a user from the command line detach from
> > specific namespaces of the parent process, and execute a command, setns provides
> > a frontend to the setns(2) syscall, which allows a user to migrate a process to
> > the namespaces of other processes, prior to calling exec on a command.
> 
> Do we really need a new command? Can't we extend unshare(1)?
> 
>  create a new namespace:
> 
>     unshare --{mount,ipc,...} <program> [<args>]
>     
>  move to already existing namespace:
> 
>     unshare --namespace <pid> --{ipc,...} <program> [<args>]
> 
> 
> From user's point of view in both cases the <program> will be unshared
> from the current namespace so the util name seems OK.
> 
> IMHO it seems better then add a new command.
> 
> 
> If you really want to support direct namespace paths (/proc/<pid>/ns/<nsname>)
> then we can use
> 
>     unshare --namespace <path> <program> [<args>]
> 
> anyway this way should be optional and not required. It's naive to
> expect that everyone remembers and understands all the /proc tricks.
> 
Ok, fair enough, I can rewrite this to extend unshare
Neil

>     Karel
> 
> -- 
>  Karel Zak  <kzak@xxxxxxxxxx>
>  http://karelzak.blogspot.com
> 
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux