mirror of
https://github.com/containers/podman.git
synced 2025-07-03 09:17:15 +08:00
pkg/trust: Take the default policy path from c/common/pkg/config
This reduces the number of places default policy path is defined to two. [NO NEW TESTS NEEDED] Signed-off-by: Doug Rabson <dfr@rabson.org>
This commit is contained in:
@ -12,6 +12,7 @@ import (
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/containers/common/pkg/config"
|
||||
"github.com/containers/image/v5/types"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
@ -53,7 +54,7 @@ type genericRepoMap map[string]json.RawMessage
|
||||
|
||||
// DefaultPolicyPath returns a path to the default policy of the system.
|
||||
func DefaultPolicyPath(sys *types.SystemContext) string {
|
||||
systemDefaultPolicyPath := "/etc/containers/policy.json"
|
||||
systemDefaultPolicyPath := config.DefaultSignaturePolicyPath
|
||||
if sys != nil {
|
||||
if sys.SignaturePolicyPath != "" {
|
||||
return sys.SignaturePolicyPath
|
||||
|
Reference in New Issue
Block a user