runtime: Use correct ctx for initialization of security.
The issue was that the client used for agent iniliazation was
not being added as a dependency in the runtime, which caused the
agent to close before the servers had unmounted.
Users should not have to explicitly call server.Stop().
Change-Id: Ia6b3aa4c69fcbeec5a990fd9ba0e2d417aea40fb
diff --git a/profiles/internal/rt/runtime.go b/profiles/internal/rt/runtime.go
index 8eba35a..ac33df5 100644
--- a/profiles/internal/rt/runtime.go
+++ b/profiles/internal/rt/runtime.go
@@ -144,7 +144,7 @@
// The client we create here is incomplete (has a nil principal) and only works
// because the agent uses anonymous unix sockets and VCSecurityNone.
// After security is initialized we attach a real client.
- _, client, err := r.SetNewClient(ctx)
+ ctx, client, err := r.SetNewClient(ctx)
if err != nil {
return nil, nil, nil, err
}