Skip to content

Commit

Permalink
Merge pull request #16619 from dfr/default-policy
Browse files Browse the repository at this point in the history
pkg/trust: Take the default policy path from c/common/pkg/config
  • Loading branch information
openshift-merge-robot committed Nov 25, 2022
2 parents fd142ef + 6502b1f commit 4135655
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/trust/policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
"path/filepath"
"strings"

"github.com/containers/common/pkg/config"
"github.com/containers/image/v5/types"
"github.com/sirupsen/logrus"
)
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 4135655

Please sign in to comment.