mirror of
https://github.com/containers/podman.git
synced 2025-12-01 02:27:13 +08:00
vendor containers/common@main
Also adjust the e2e tests to account for SYS_CHROOT having made it back to the default caps. Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
This commit is contained in:
24
vendor/github.com/containers/common/pkg/config/config.go
generated
vendored
24
vendor/github.com/containers/common/pkg/config/config.go
generated
vendored
@@ -765,11 +765,21 @@ func addConfigs(dirPath string, configs []string) ([]string, error) {
|
||||
// Returns the list of configuration files, if they exist in order of hierarchy.
|
||||
// The files are read in order and each new file can/will override previous
|
||||
// file settings.
|
||||
func systemConfigs() ([]string, error) {
|
||||
var err error
|
||||
configs := []string{}
|
||||
path := os.Getenv("CONTAINERS_CONF")
|
||||
if path != "" {
|
||||
func systemConfigs() (configs []string, finalErr error) {
|
||||
if path := os.Getenv("CONTAINERS_CONF_OVERRIDE"); path != "" {
|
||||
if _, err := os.Stat(path); err != nil {
|
||||
return nil, fmt.Errorf("CONTAINERS_CONF_OVERRIDE file: %w", err)
|
||||
}
|
||||
// Add the override config last to make sure it can override any
|
||||
// previous settings.
|
||||
defer func() {
|
||||
if finalErr == nil {
|
||||
configs = append(configs, path)
|
||||
}
|
||||
}()
|
||||
}
|
||||
|
||||
if path := os.Getenv("CONTAINERS_CONF"); path != "" {
|
||||
if _, err := os.Stat(path); err != nil {
|
||||
return nil, fmt.Errorf("CONTAINERS_CONF file: %w", err)
|
||||
}
|
||||
@@ -781,12 +791,14 @@ func systemConfigs() ([]string, error) {
|
||||
if _, err := os.Stat(OverrideContainersConfig); err == nil {
|
||||
configs = append(configs, OverrideContainersConfig)
|
||||
}
|
||||
|
||||
var err error
|
||||
configs, err = addConfigs(OverrideContainersConfig+".d", configs)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
path, err = ifRootlessConfigPath()
|
||||
path, err := ifRootlessConfigPath()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
1
vendor/github.com/containers/common/pkg/config/containers.conf
generated
vendored
1
vendor/github.com/containers/common/pkg/config/containers.conf
generated
vendored
@@ -68,6 +68,7 @@
|
||||
# "SETGID",
|
||||
# "SETPCAP",
|
||||
# "SETUID",
|
||||
# "SYS_CHROOT",
|
||||
#]
|
||||
|
||||
# A list of sysctls to be set in containers by default,
|
||||
|
||||
1
vendor/github.com/containers/common/pkg/config/default.go
generated
vendored
1
vendor/github.com/containers/common/pkg/config/default.go
generated
vendored
@@ -60,6 +60,7 @@ var (
|
||||
"CAP_SETGID",
|
||||
"CAP_SETPCAP",
|
||||
"CAP_SETUID",
|
||||
"CAP_SYS_CHROOT",
|
||||
}
|
||||
|
||||
// Search these locations in which CNIPlugins can be installed.
|
||||
|
||||
2
vendor/github.com/containers/common/version/version.go
generated
vendored
2
vendor/github.com/containers/common/version/version.go
generated
vendored
@@ -1,4 +1,4 @@
|
||||
package version
|
||||
|
||||
// Version is the version of the build.
|
||||
const Version = "0.51.1-dev"
|
||||
const Version = "0.52.0-dev"
|
||||
|
||||
Reference in New Issue
Block a user