Skip to content

Commit

Permalink
Merge branch 'main' into fix-cgroup-path
Browse files Browse the repository at this point in the history
Signed-off-by: Tianyang Zhang <burning9699@gmail.com>
  • Loading branch information
Burning1020 authored Oct 31, 2023
2 parents 79e0ea4 + ef1166a commit 82842b3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libcontainer/cgroups/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"strings"
"sync"

"github.com/opencontainers/runc/libcontainer/utils"
"github.com/sirupsen/logrus"
"golang.org/x/sys/unix"
)
Expand Down Expand Up @@ -111,7 +112,7 @@ func openFile(dir, file string, flags int) (*os.File, error) {
flags |= os.O_TRUNC | os.O_CREATE
mode = 0o600
}
path := path.Join(dir, file)
path := path.Join(dir, utils.CleanPath(file))
if prepareOpenat2() != nil {
return openFallback(path, flags, mode)
}
Expand Down

0 comments on commit 82842b3

Please sign in to comment.