Skip to content

Commit

Permalink
policy: extend default networking mounts for standalone containers (#…
Browse files Browse the repository at this point in the history
…1826)

Signed-off-by: Maksim An <maksiman@microsoft.com>
  • Loading branch information
anmaxvl authored Jul 20, 2023
1 parent d71606e commit 28cce9c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/guest/runtime/hcsv2/uvm.go
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,10 @@ func (h *Host) CreateContainer(ctx context.Context, id string, settings *prot.VM
_ = os.RemoveAll(settings.OCIBundlePath)
}
}()
if err := policy.ExtendPolicyWithNetworkingMounts(id, h.securityPolicyEnforcer,
settings.OCISpecification); err != nil {
return nil, err
}
}

user, groups, umask, err := h.securityPolicyEnforcer.GetUserInfo(id, settings.OCISpecification.Process)
Expand Down

0 comments on commit 28cce9c

Please # to comment.