veyron/runtimes/google/rt: Avoid using global flags in the library.
The veyron/security/flag library is meant for use in "main"s.
Using it within a library can create confusion as it may not
be clear to the user what services the flags affect.
For now, use the default authorization policy in rt/mgmt.go.
The tests seem to pass with it.
If and when we need a more nuanced policy, it should be
specified as an argument or a separate flag.
TESTED=go test veyron/... veyron2/...
Change-Id: I682cfde0da55f142d691c808f183681fe08bcf02
diff --git a/runtimes/google/rt/mgmt.go b/runtimes/google/rt/mgmt.go
index ecb62f1..e476ec0 100644
--- a/runtimes/google/rt/mgmt.go
+++ b/runtimes/google/rt/mgmt.go
@@ -7,7 +7,6 @@
"time"
"veyron/runtimes/google/appcycle"
- vflag "veyron/security/flag"
"veyron/services/mgmt/lib/exec"
"veyron2"
@@ -57,7 +56,7 @@
if ep, err = m.server.Listen("tcp", "127.0.0.1:0"); err != nil {
return err
}
- if err := m.server.Serve("", ipc.SoloDispatcher(appcycle.NewServerAppCycle(m), vflag.NewAuthorizerOrDie())); err != nil {
+ if err := m.server.Serve("", ipc.SoloDispatcher(appcycle.NewServerAppCycle(m), nil)); err != nil {
return err
}
return m.callbackToParent(parentName, naming.JoinAddressName(ep.String(), ""))