1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/execdriver/lxc
Alexander Larsson 08ab554195 Fix handling of shared roots
If rootIsShared() is detected we apply the shell stuff to early, before
the real command and arguments are added to the parameters. This
means they get passed on to unshare rather than docker-init, breaking
docker on e.g. fedora like:

goroutine 1 [running]:
runtime.panic(0x678340, 0x9b3fd7)
	/usr/lib64/golang/src/pkg/runtime/panic.c:266 +0xb6
github.com/dotcloud/docker/execdriver/lxc.func·001(0xc21000a1b0, 0xc21001eab0, 0x7fff24715faf)
	/home/alex/vcs/go/src/github.com/dotcloud/docker/execdriver/lxc/driver.go:41 +0x525
github.com/dotcloud/docker/sysinit.executeProgram(0xc21000a1b0, 0xc21000a1b0, 0xa)
	/home/alex/vcs/go/src/github.com/dotcloud/docker/sysinit/sysinit.go:34 +0xca
github.com/dotcloud/docker/sysinit.SysInit()
	/home/alex/vcs/go/src/github.com/dotcloud/docker/sysinit/sysinit.go:88 +0x791
main.main()
	/home/alex/vcs/go/src/github.com/dotcloud/docker/dockerinit/dockerinit.go:14 +0x1a

The fix is to construct the full params array before escaping it.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
2014-01-21 10:22:13 +01:00
..
driver.go Fix handling of shared roots 2014-01-21 10:22:13 +01:00
init.go Small fixes to type names 2014-01-17 17:42:22 -08:00
lxc_init_darwin.go Move docker init into drivers functions 2014-01-17 17:42:22 -08:00
lxc_init_linux.go Move docker init into drivers functions 2014-01-17 17:42:22 -08:00
lxc_template.go Don't expose cgroups via the execdriver API. 2014-01-20 17:06:24 -05:00
lxc_template_unit_test.go Don't expose cgroups via the execdriver API. 2014-01-20 17:06:24 -05:00