diff --git a/libcontainer/rootfs_linux.go b/libcontainer/rootfs_linux.go index 3e3a7d2e..d4cb3961 100644 --- a/libcontainer/rootfs_linux.go +++ b/libcontainer/rootfs_linux.go @@ -332,7 +332,7 @@ func setupDevSymlinks(rootfs string) error { // symlinks are resolved locally. func reOpenDevNull() error { var stat, devNullStat syscall.Stat_t - file, err := os.Open("/dev/null") + file, err := os.OpenFile("/dev/null", os.O_RDWR, 0) if err != nil { return fmt.Errorf("Failed to open /dev/null - %s", err) }