mirror of
https://github.com/containers/podman.git
synced 2025-05-21 09:05:56 +08:00
Merge pull request #8806 from rhatdan/keyring
Pass down EnableKeyring from containers.conf to conmon
This commit is contained in:
@ -69,6 +69,7 @@ type ConmonOCIRuntime struct {
|
|||||||
supportsKVM bool
|
supportsKVM bool
|
||||||
supportsNoCgroups bool
|
supportsNoCgroups bool
|
||||||
sdNotify bool
|
sdNotify bool
|
||||||
|
enableKeyring bool
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make a new Conmon-based OCI runtime with the given options.
|
// Make a new Conmon-based OCI runtime with the given options.
|
||||||
@ -107,6 +108,7 @@ func newConmonOCIRuntime(name string, paths []string, conmonPath string, runtime
|
|||||||
runtime.noPivot = runtimeCfg.Engine.NoPivotRoot
|
runtime.noPivot = runtimeCfg.Engine.NoPivotRoot
|
||||||
runtime.reservePorts = runtimeCfg.Engine.EnablePortReservation
|
runtime.reservePorts = runtimeCfg.Engine.EnablePortReservation
|
||||||
runtime.sdNotify = runtimeCfg.Engine.SDNotify
|
runtime.sdNotify = runtimeCfg.Engine.SDNotify
|
||||||
|
runtime.enableKeyring = runtimeCfg.Containers.EnableKeyring
|
||||||
|
|
||||||
// TODO: probe OCI runtime for feature and enable automatically if
|
// TODO: probe OCI runtime for feature and enable automatically if
|
||||||
// available.
|
// available.
|
||||||
@ -1021,6 +1023,9 @@ func (r *ConmonOCIRuntime) createOCIContainer(ctr *Container, restoreOptions *Co
|
|||||||
args = append(args, "-i")
|
args = append(args, "-i")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if !r.enableKeyring {
|
||||||
|
args = append(args, "--no-new-keyring")
|
||||||
|
}
|
||||||
if ctr.config.ConmonPidFile != "" {
|
if ctr.config.ConmonPidFile != "" {
|
||||||
args = append(args, "--conmon-pidfile", ctr.config.ConmonPidFile)
|
args = append(args, "--conmon-pidfile", ctr.config.ConmonPidFile)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user