Adds forkexec library that supports user namespaces in Go.

This PR adds a library that could be used to clone into user namespaces and write uid/gid mappings.
(This is based on joint effort between me and crosbymichael).

Docker-DCO-1.1-Signed-off-by: Mrunal Patel <mrunalp@gmail.com> (github: mrunalp)
Yeah, I think we could. 

Sent from my iPhone

> On Aug 11, 2014, at 3:27 PM, Brandon Philips <notifications@github.com> wrote:
> 
> In forkexec/forkexec.go:
> 
> > +	argv0p, err := BytePtrFromString(argv0)
> > +	if err != nil {
> > +		return 0, err
> > +	}
> > +	argvp, err := SlicePtrFromStrings(argv)
> > +	if err != nil {
> > +		return 0, err
> > +	}
> > +	envvp, err := SlicePtrFromStrings(attr.Env)
> > +	if err != nil {
> > +		return 0, err
> > +	}
> > +
> > +	if (runtime.GOOS == "freebsd" || runtime.GOOS == "dragonfly") && len(argv[0]) > len(argv0) {
> > +		argvp[0] = argv0p
> > +	}
> Should we drop this code? Since we don't care about OSes that don't support user namespaces?
> 
> —
> Reply to this email directly or view it on GitHub.