Skip to content

Commit a6f1c63

Browse files
committed
fix lint issues with github.com/cyphar/filepath-securejoin
The old location is deprecated and has been removed in v0.6.0 even. I did this as extra commit to make cherry-picking easier. Signed-off-by: Paul Holzinger <[email protected]>
1 parent e0ef836 commit a6f1c63

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

libpod/container_internal_linux.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import (
1717
"github.com/containers/podman/v6/libpod/define"
1818
"github.com/containers/podman/v6/libpod/shutdown"
1919
"github.com/containers/podman/v6/pkg/rootless"
20-
securejoin "github.com/cyphar/filepath-securejoin"
20+
"github.com/cyphar/filepath-securejoin/pathrs-lite"
2121
"github.com/moby/sys/capability"
2222
spec "github.com/opencontainers/runtime-spec/specs-go"
2323
"github.com/opencontainers/runtime-tools/generate"
@@ -741,7 +741,7 @@ func (s *safeMountInfo) Close() {
741741
// The caller is responsible for closing the file descriptor and unmounting the subpath
742742
// when it's no longer needed.
743743
func (c *Container) safeMountSubPath(mountPoint, subpath string) (s *safeMountInfo, err error) {
744-
file, err := securejoin.OpenInRoot(mountPoint, subpath)
744+
file, err := pathrs.OpenInRoot(mountPoint, subpath)
745745
if err != nil {
746746
return nil, err
747747
}
@@ -834,7 +834,7 @@ var hasCapSysResource = sync.OnceValues(func() (bool, error) {
834834

835835
// containerPathIsFile returns true if the given containerPath is a file
836836
func containerPathIsFile(unsafeRoot string, containerPath string) (bool, error) {
837-
f, err := securejoin.OpenInRoot(unsafeRoot, containerPath)
837+
f, err := pathrs.OpenInRoot(unsafeRoot, containerPath)
838838
if err != nil {
839839
return false, err
840840
}

pkg/domain/infra/abi/play_linux.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ package abi
55
import (
66
"os"
77

8-
securejoin "github.com/cyphar/filepath-securejoin"
8+
"github.com/cyphar/filepath-securejoin/pathrs-lite"
99
)
1010

1111
// openSymlinkPath opens the path under root using securejoin.OpenatInRoot().
1212
func openSymlinkPath(root *os.File, unsafePath string, flags int) (*os.File, error) {
13-
file, err := securejoin.OpenatInRoot(root, unsafePath)
13+
file, err := pathrs.OpenatInRoot(root, unsafePath)
1414
if err != nil {
1515
return nil, err
1616
}
17-
return securejoin.Reopen(file, flags)
17+
return pathrs.Reopen(file, flags)
1818
}

0 commit comments

Comments
 (0)