Skip to content
This repository has been archived by the owner on Dec 13, 2018. It is now read-only.

Commit

Permalink
Fix /proc/kcore mount of /dev/null
Browse files Browse the repository at this point in the history
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
  • Loading branch information
crosbymichael committed May 1, 2014
1 parent ab60f78 commit 3720dca
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions security/restrict/restrict.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ func Restrict() error {
return fmt.Errorf("unable to remount %s readonly: %s", dest, err)
}
}

if err := system.Mount("/proc/kcore", "/dev/null", "", syscall.MS_BIND, ""); err != nil {
if err := system.Mount("/dev/null", "/proc/kcore", "", syscall.MS_BIND, ""); err != nil {
return fmt.Errorf("unable to bind-mount /dev/null over /proc/kcore")
}

Expand Down

0 comments on commit 3720dca

Please sign in to comment.