x/ref: Restructure security packages
Here are the renamings:
security -> lib/security
security/audit -> lib/security/audit
security/flag -> lib/security/securityflag
security/serialization -> lib/security/serialization
security/agent -> services/agent
security/agent/agentd -> services/agent/agentd
security/agent/keymgr -> services/agent/keymgr
security/agent/server -> services/agent/server
security/agent/cache -> services/agent/internal/cache
security/agent/lru -> services/agent/internal/lru
security/agent/pingpong -> services/agent/internal/pingpong
security/agent/test_principal -> services/agent/internal/test_principal
Note that the restructuring is not done, even after this CL is
submitted. In particular, services/agent is supposed to contain
the *.vdl files, and the client and server libraries are supposed
to live in services/agent/agentlib, per our conventions. Also
lib/unixfd can also be moved under services/agent/internal. That
will be fixed in a subsequent CL.
MultiPart: 1/3
Change-Id: Ie9b14083d133a661f0d3a6c33a3ae05e3bac3cd2
diff --git a/profiles/roaming/roaminginit.go b/profiles/roaming/roaminginit.go
index 9edddc6..342422d 100644
--- a/profiles/roaming/roaminginit.go
+++ b/profiles/roaming/roaminginit.go
@@ -21,22 +21,19 @@
"v.io/v23/config"
"v.io/v23/context"
"v.io/v23/rpc"
- "v.io/x/lib/vlog"
-
"v.io/x/lib/netconfig"
"v.io/x/lib/netstate"
+ "v.io/x/lib/vlog"
"v.io/x/ref/lib/flags"
+ "v.io/x/ref/lib/security/securityflag"
"v.io/x/ref/profiles/internal"
"v.io/x/ref/profiles/internal/lib/appcycle"
"v.io/x/ref/profiles/internal/lib/websocket"
_ "v.io/x/ref/profiles/internal/rpc/protocols/tcp"
_ "v.io/x/ref/profiles/internal/rpc/protocols/ws"
_ "v.io/x/ref/profiles/internal/rpc/protocols/wsh"
- grt "v.io/x/ref/profiles/internal/rt"
+ "v.io/x/ref/profiles/internal/rt"
"v.io/x/ref/services/debug/debuglib"
-
- // TODO(cnicolaou,ashankar): move this into flags.
- sflag "v.io/x/ref/security/flag"
)
const (
@@ -61,7 +58,7 @@
Addrs: rpc.ListenAddrs(lf.Addrs),
Proxy: lf.ListenProxy,
}
- reservedDispatcher := debuglib.NewDispatcher(vlog.Log.LogDir, sflag.NewAuthorizerOrDie())
+ reservedDispatcher := debuglib.NewDispatcher(vlog.Log.LogDir, securityflag.NewAuthorizerOrDie())
ac := appcycle.New()
@@ -72,7 +69,7 @@
listenSpec.AddressChooser = func(string, []rpc.Address) ([]rpc.Address, error) {
return []rpc.Address{&netstate.AddrIfc{addr, "nat", nil}}, nil
}
- runtime, ctx, shutdown, err := grt.Init(ctx, ac, nil, &listenSpec, commonFlags.RuntimeFlags(), reservedDispatcher)
+ runtime, ctx, shutdown, err := rt.Init(ctx, ac, nil, &listenSpec, commonFlags.RuntimeFlags(), reservedDispatcher)
if err != nil {
return nil, nil, shutdown, err
}
@@ -115,7 +112,7 @@
listenSpec.StreamName = SettingsStreamName
listenSpec.AddressChooser = internal.IPAddressChooser
- runtime, ctx, shutdown, err := grt.Init(ctx, ac, nil, &listenSpec, commonFlags.RuntimeFlags(), reservedDispatcher)
+ runtime, ctx, shutdown, err := rt.Init(ctx, ac, nil, &listenSpec, commonFlags.RuntimeFlags(), reservedDispatcher)
if err != nil {
return nil, nil, shutdown, err
}
@@ -133,7 +130,7 @@
// monitorNetworkSettings will monitor network configuration changes and
// publish subsequent Settings to reflect any changes detected.
func monitorNetworkSettingsX(
- runtime *grt.Runtime,
+ runtime *rt.Runtime,
ctx *context.T,
watcher netconfig.NetConfigWatcher,
prev netstate.AddrList,