-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3753 from kolyshkin/user-exec
Fix runc run "permission denied" when rootless
- Loading branch information
Showing
6 changed files
with
61 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
ARG GO_VERSION=1.19 | ||
ARG GO_VERSION=1.20 | ||
ARG BATS_VERSION=v1.3.0 | ||
ARG LIBSECCOMP_VERSION=2.5.4 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
//go:build !go1.20 | ||
// +build !go1.20 | ||
|
||
package libcontainer | ||
|
||
import "golang.org/x/sys/unix" | ||
|
||
func eaccess(path string) error { | ||
// This check is similar to access(2) with X_OK except for | ||
// setuid/setgid binaries where it checks against the effective | ||
// (rather than real) uid and gid. It is not needed in go 1.20 | ||
// and beyond and will be removed later. | ||
|
||
// Relies on code added in https://go-review.googlesource.com/c/sys/+/468877 | ||
// and older CLs linked from there. | ||
return unix.Faccessat(unix.AT_FDCWD, path, unix.X_OK, unix.AT_EACCESS) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
//go:build go1.20 | ||
|
||
package libcontainer | ||
|
||
func eaccess(path string) error { | ||
// Not needed in Go 1.20+ as the functionality is already in there | ||
// (added by https://go.dev/cl/416115, https://go.dev/cl/414824, | ||
// and fixed in Go 1.20.2 by https://go.dev/cl/469956). | ||
return nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters