From 1cdaa709f151b61cee2bdaa09d8e5d2b58a8ba72 Mon Sep 17 00:00:00 2001 From: Guilherme Rezende Date: Sun, 24 Jul 2016 19:41:57 -0300 Subject: [PATCH] libcontainer: rename keyctl package to keys This avoid the goimports tool from remove the libcontainer/keys import line due the package name is diferent from folder name Signed-off-by: Guilherme Rezende --- libcontainer/keys/keyctl.go | 2 +- libcontainer/setns_init_linux.go | 2 +- libcontainer/standard_init_linux.go | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libcontainer/keys/keyctl.go b/libcontainer/keys/keyctl.go index c67fd15b0..8c90e56a6 100644 --- a/libcontainer/keys/keyctl.go +++ b/libcontainer/keys/keyctl.go @@ -1,6 +1,6 @@ // +build linux -package keyctl +package keys import ( "fmt" diff --git a/libcontainer/setns_init_linux.go b/libcontainer/setns_init_linux.go index 4b78ae801..2a8f34528 100644 --- a/libcontainer/setns_init_linux.go +++ b/libcontainer/setns_init_linux.go @@ -26,7 +26,7 @@ func (l *linuxSetnsInit) getSessionRingName() string { func (l *linuxSetnsInit) Init() error { if !l.config.Config.NoNewKeyring { // do not inherit the parent's session keyring - if _, err := keyctl.JoinSessionKeyring(l.getSessionRingName()); err != nil { + if _, err := keys.JoinSessionKeyring(l.getSessionRingName()); err != nil { return err } } diff --git a/libcontainer/standard_init_linux.go b/libcontainer/standard_init_linux.go index 4a497e2bb..87515e1e1 100644 --- a/libcontainer/standard_init_linux.go +++ b/libcontainer/standard_init_linux.go @@ -49,12 +49,12 @@ func (l *linuxStandardInit) Init() error { ringname, keepperms, newperms := l.getSessionRingParams() // do not inherit the parent's session keyring - sessKeyId, err := keyctl.JoinSessionKeyring(ringname) + sessKeyId, err := keys.JoinSessionKeyring(ringname) if err != nil { return err } // make session keyring searcheable - if err := keyctl.ModKeyringPerm(sessKeyId, keepperms, newperms); err != nil { + if err := keys.ModKeyringPerm(sessKeyId, keepperms, newperms); err != nil { return err } }