Skip to content

Commit de92f4b

Browse files
authored
Merge pull request #4608 from kolyshkin/1.2-4590
[1.2] deps: update to github.com/cyphar/[email protected]
2 parents 456d770 + 00f4a5c commit de92f4b

File tree

15 files changed

+403
-50
lines changed

15 files changed

+403
-50
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ require (
1212
github.com/cilium/ebpf v0.16.0
1313
github.com/containerd/console v1.0.4
1414
github.com/coreos/go-systemd/v22 v22.5.0
15-
github.com/cyphar/filepath-securejoin v0.3.5
15+
github.com/cyphar/filepath-securejoin v0.4.1
1616
github.com/docker/go-units v0.5.0
1717
github.com/godbus/dbus/v5 v5.1.0
1818
github.com/moby/sys/mountinfo v0.7.1

go.sum

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8
99
github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
1010
github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w=
1111
github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
12-
github.com/cyphar/filepath-securejoin v0.3.5 h1:L81NHjquoQmcPgXcttUS9qTSR/+bXry6pbSINQGpjj4=
13-
github.com/cyphar/filepath-securejoin v0.3.5/go.mod h1:edhVd3c6OXKjUmSrVa/tGJRS9joFTxlslFCAyaxigkE=
12+
github.com/cyphar/filepath-securejoin v0.4.1 h1:JyxxyPEaktOD+GAnqIqTf9A8tHyAG22rowi7HkoSU1s=
13+
github.com/cyphar/filepath-securejoin v0.4.1/go.mod h1:Sdj7gXlvMcPZsbhwhQ33GguGLDGQL7h7bg04C/+u9jI=
1414
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
1515
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
1616
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
@@ -68,9 +68,8 @@ github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpE
6868
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
6969
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
7070
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
71+
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
7172
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
72-
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
73-
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
7473
github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635 h1:kdXcSzyDtseVEc4yCz2qF8ZrQvIDBJLl4S1c3GCXmoI=
7574
github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww=
7675
github.com/urfave/cli v1.22.14 h1:ebbhrRiGK2i4naQJr+1Xj92HXZCrK7MsyTS/ob3HnAk=

libcontainer/utils/utils_unix.go

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -287,9 +287,6 @@ func IsLexicallyInRoot(root, path string) bool {
287287
// try to detect any symlink components in the path while we are doing the
288288
// MkdirAll.
289289
//
290-
// NOTE: Unlike os.MkdirAll, mode is not Go's os.FileMode, it is the unix mode
291-
// (the suid/sgid/sticky bits are not the same as for os.FileMode).
292-
//
293290
// NOTE: If unsafePath is a subpath of root, we assume that you have already
294291
// called SecureJoin and so we use the provided path verbatim without resolving
295292
// any symlinks (this is done in a way that avoids symlink-exchange races).
@@ -300,7 +297,7 @@ func IsLexicallyInRoot(root, path string) bool {
300297
// handling if unsafePath has already been scoped within the rootfs (this is
301298
// needed for a lot of runc callers and fixing this would require reworking a
302299
// lot of path logic).
303-
func MkdirAllInRootOpen(root, unsafePath string, mode uint32) (_ *os.File, Err error) {
300+
func MkdirAllInRootOpen(root, unsafePath string, mode os.FileMode) (_ *os.File, Err error) {
304301
// If the path is already "within" the root, get the path relative to the
305302
// root and use that as the unsafe path. This is necessary because a lot of
306303
// MkdirAllInRootOpen callers have already done SecureJoin, and refactoring
@@ -334,12 +331,12 @@ func MkdirAllInRootOpen(root, unsafePath string, mode uint32) (_ *os.File, Err e
334331
}
335332
defer rootDir.Close()
336333

337-
return securejoin.MkdirAllHandle(rootDir, unsafePath, int(mode))
334+
return securejoin.MkdirAllHandle(rootDir, unsafePath, mode)
338335
}
339336

340337
// MkdirAllInRoot is a wrapper around MkdirAllInRootOpen which closes the
341338
// returned handle, for callers that don't need to use it.
342-
func MkdirAllInRoot(root, unsafePath string, mode uint32) error {
339+
func MkdirAllInRoot(root, unsafePath string, mode os.FileMode) error {
343340
f, err := MkdirAllInRootOpen(root, unsafePath, mode)
344341
if err == nil {
345342
_ = f.Close()

vendor/github.com/cyphar/filepath-securejoin/CHANGELOG.md

Lines changed: 71 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/cyphar/filepath-securejoin/VERSION

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/cyphar/filepath-securejoin/gocompat_errors_go120.go

Lines changed: 18 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/cyphar/filepath-securejoin/gocompat_errors_unsupported.go

Lines changed: 38 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/cyphar/filepath-securejoin/gocompat_generics_go121.go

Lines changed: 32 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/cyphar/filepath-securejoin/gocompat_generics_unsupported.go

Lines changed: 124 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)