Don't label the console as it already has the right label

[@cyphar: removed mountLabel argument from .mount().]

Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
Signed-off-by: Aleksa Sarai <asarai@suse.de>
This commit is contained in:
Mrunal Patel
2016-09-13 15:09:09 -07:00
committed by Aleksa Sarai
parent c0c8edb9e8
commit f1324a9fc1
2 changed files with 2 additions and 7 deletions
+1 -6
View File
@@ -5,8 +5,6 @@ import (
"os"
"syscall"
"unsafe"
"github.com/opencontainers/runc/libcontainer/label"
)
// newConsole returns an initialized console that can be used within a container by copying bytes
@@ -63,12 +61,9 @@ func (c *linuxConsole) Close() error {
// mount initializes the console inside the rootfs mounting with the specified mount label
// and applying the correct ownership of the console.
func (c *linuxConsole) mount(mountLabel string) error {
func (c *linuxConsole) mount() error {
oldMask := syscall.Umask(0000)
defer syscall.Umask(oldMask)
if err := label.SetFileLabel(c.slavePath, mountLabel); err != nil {
return err
}
f, err := os.Create("/dev/console")
if err != nil && !os.IsExist(err) {
return err