mirror of https://github.com/containers/podman.git
fix lint in pkg/rootless
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
This commit is contained in:
parent
88369acfca
commit
83764b84ec
|
@ -7,6 +7,9 @@ import (
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// TryJoinPauseProcess attempts to join the namespaces of the pause PID via
|
||||||
|
// TryJoinFromFilePaths. If joining fails, it attempts to delete the specified
|
||||||
|
// file.
|
||||||
func TryJoinPauseProcess(pausePidPath string) (bool, int, error) {
|
func TryJoinPauseProcess(pausePidPath string) (bool, int, error) {
|
||||||
if _, err := os.Stat(pausePidPath); err != nil {
|
if _, err := os.Stat(pausePidPath); err != nil {
|
||||||
return false, -1, nil
|
return false, -1, nil
|
||||||
|
|
|
@ -514,6 +514,8 @@ func TryJoinFromFilePaths(pausePidPath string, needNewNamespace bool, paths []st
|
||||||
|
|
||||||
return joinUserAndMountNS(uint(pausePid), pausePidPath)
|
return joinUserAndMountNS(uint(pausePid), pausePidPath)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ReadMappingsProc parses and returns the ID mappings at the specified path.
|
||||||
func ReadMappingsProc(path string) ([]idtools.IDMap, error) {
|
func ReadMappingsProc(path string) ([]idtools.IDMap, error) {
|
||||||
file, err := os.Open(path)
|
file, err := os.Open(path)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue