mirror of
https://github.com/moby/moby.git
synced 2026-01-17 21:58:03 +00:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7c8fca2ddb | ||
|
|
376188dcd3 | ||
|
|
dc610864aa |
@@ -1,5 +1,10 @@
|
||||
# Changelog
|
||||
|
||||
## 1.6.2 (2015-05-13)
|
||||
|
||||
#### Runtime
|
||||
- Revert change prohibiting mounting into /sys
|
||||
|
||||
## 1.6.1 (2015-05-07)
|
||||
|
||||
#### Security
|
||||
|
||||
@@ -75,7 +75,7 @@ rm -rf src/github.com/docker/distribution
|
||||
mkdir -p src/github.com/docker/distribution
|
||||
mv tmp-digest src/github.com/docker/distribution/digest
|
||||
|
||||
clone git github.com/docker/libcontainer 1b471834b45063b61e0aedefbb1739a8f34b414e
|
||||
clone git github.com/docker/libcontainer 227771c8f611f03639f0eeb169428761d9504ab5
|
||||
# see src/github.com/docker/libcontainer/update-vendor.sh which is the "source of truth" for libcontainer deps (just like this file)
|
||||
rm -rf src/github.com/docker/libcontainer/vendor
|
||||
eval "$(grep '^clone ' src/github.com/docker/libcontainer/update-vendor.sh | grep -v 'github.com/codegangsta/cli' | grep -v 'github.com/Sirupsen/logrus')"
|
||||
|
||||
@@ -3499,9 +3499,9 @@ func TestMountIntoProc(t *testing.T) {
|
||||
|
||||
func TestMountIntoSys(t *testing.T) {
|
||||
defer deleteAllContainers()
|
||||
code, err := runCommand(exec.Command(dockerBinary, "run", "-v", "/sys/", "busybox", "true"))
|
||||
if err == nil || code == 0 {
|
||||
t.Fatal("container should not be able to mount into /sys")
|
||||
_, err := runCommand(exec.Command(dockerBinary, "run", "-v", "/sys/fs/cgroup", "busybox", "true"))
|
||||
if err != nil {
|
||||
t.Fatal("container should be able to mount into /sys")
|
||||
}
|
||||
logDone("run - mount into sys")
|
||||
}
|
||||
|
||||
@@ -119,6 +119,9 @@ func (p *setnsProcess) execSetns() error {
|
||||
// terminate sends a SIGKILL to the forked process for the setns routine then waits to
|
||||
// avoid the process becomming a zombie.
|
||||
func (p *setnsProcess) terminate() error {
|
||||
if p.cmd.Process == nil {
|
||||
return nil
|
||||
}
|
||||
err := p.cmd.Process.Kill()
|
||||
if _, werr := p.wait(); err == nil {
|
||||
err = werr
|
||||
|
||||
@@ -150,7 +150,6 @@ func checkMountDestination(rootfs, dest string) error {
|
||||
}
|
||||
invalidDestinations := []string{
|
||||
"/proc",
|
||||
"/sys",
|
||||
}
|
||||
for _, invalid := range invalidDestinations {
|
||||
path, err := filepath.Rel(filepath.Join(rootfs, invalid), dest)
|
||||
|
||||
@@ -15,8 +15,8 @@ func TestCheckMountDestOnProc(t *testing.T) {
|
||||
func TestCheckMountDestInSys(t *testing.T) {
|
||||
dest := "/rootfs//sys/fs/cgroup"
|
||||
err := checkMountDestination("/rootfs", dest)
|
||||
if err == nil {
|
||||
t.Fatal("destination inside proc should return an error")
|
||||
if err != nil {
|
||||
t.Fatal("destination inside /sys should not return an error")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user