Skip to content

Commit

Permalink
policyEnforcer casting part of the if statement
Browse files Browse the repository at this point in the history
  • Loading branch information
Stavros Volos committed Nov 11, 2021
1 parent eb3e6a0 commit 79626d9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/guest/runtime/hcsv2/uvm.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,8 @@ func (h *Host) CreateContainer(ctx context.Context, id string, settings *prot.VM
// We append the variable after the security policy enforcing logic completes so as to bypass it; the
// security policy variable cannot be included in the security policy as its value is not available
// security policy construction time.
policyEnforcer, ok := (h.securityPolicyEnforcer).(*securitypolicy.StandardSecurityPolicyEnforcer)
if ok {

if policyEnforcer, ok := (h.securityPolicyEnforcer).(*securitypolicy.StandardSecurityPolicyEnforcer); ok {
secPolicyEnv := fmt.Sprintf("SECURITY_POLICY=%s", policyEnforcer.EncodedSecurityPolicy)
settings.OCISpecification.Process.Env = append(settings.OCISpecification.Process.Env, secPolicyEnv)
}
Expand Down

0 comments on commit 79626d9

Please sign in to comment.