mirror of
https://github.com/containers/podman.git
synced 2025-10-16 18:53:19 +08:00
enable login/logut unspecified args
Signed-off-by: Qi Wang <qiwan@redhat.com>
This commit is contained in:
12
vendor/github.com/containers/common/pkg/config/default.go
generated
vendored
12
vendor/github.com/containers/common/pkg/config/default.go
generated
vendored
@ -105,6 +105,9 @@ const (
|
||||
DefaultPidsLimit = 2048
|
||||
// DefaultPullPolicy pulls the image if it does not exist locally
|
||||
DefaultPullPolicy = "missing"
|
||||
// DefaultSignaturePolicyPath is the default value for the
|
||||
// policy.json file.
|
||||
DefaultSignaturePolicyPath = "/etc/containers/policy.json"
|
||||
// DefaultRootlessSignaturePolicyPath is the default value for the
|
||||
// rootless policy.json file.
|
||||
DefaultRootlessSignaturePolicyPath = ".config/containers/policy.json"
|
||||
@ -129,14 +132,19 @@ func DefaultConfig() (*Config, error) {
|
||||
}
|
||||
|
||||
netns := "bridge"
|
||||
|
||||
defaultEngineConfig.SignaturePolicyPath = DefaultSignaturePolicyPath
|
||||
if unshare.IsRootless() {
|
||||
home, err := unshare.HomeDir()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
sigPath := filepath.Join(home, DefaultRootlessSignaturePolicyPath)
|
||||
if _, err := os.Stat(sigPath); err == nil {
|
||||
defaultEngineConfig.SignaturePolicyPath = sigPath
|
||||
defaultEngineConfig.SignaturePolicyPath = sigPath
|
||||
if _, err := os.Stat(sigPath); err != nil {
|
||||
if _, err := os.Stat(DefaultSignaturePolicyPath); err == nil {
|
||||
defaultEngineConfig.SignaturePolicyPath = DefaultSignaturePolicyPath
|
||||
}
|
||||
}
|
||||
netns = "slirp4netns"
|
||||
}
|
||||
|
Reference in New Issue
Block a user