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 <guilhermebr@gmail.com>
This commit is contained in:
parent
fb221651e5
commit
1cdaa709f1
|
@ -1,6 +1,6 @@
|
|||
// +build linux
|
||||
|
||||
package keyctl
|
||||
package keys
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue