core: ServerCall.Blessings() -> ServerCall.GrantedBlessings().
MultiPart: 2/2
Change-Id: I4d1ee2d937d8e9becb6dab05e7b900981ba19e29
diff --git a/runtimes/google/ipc/full_test.go b/runtimes/google/ipc/full_test.go
index f0ddf14..59ef887 100644
--- a/runtimes/google/ipc/full_test.go
+++ b/runtimes/google/ipc/full_test.go
@@ -125,7 +125,7 @@
}
func (*testServer) EchoGrantedBlessings(ctx ipc.ServerContext, arg string) (result, blessing string, _ error) {
- return arg, fmt.Sprintf("%v", ctx.Blessings()), nil
+ return arg, fmt.Sprintf("%v", ctx.GrantedBlessings()), nil
}
func (*testServer) EchoAndError(ctx ipc.ServerContext, arg string) (string, error) {
diff --git a/runtimes/google/ipc/reserved.go b/runtimes/google/ipc/reserved.go
index 115878e..ea01f6c 100644
--- a/runtimes/google/ipc/reserved.go
+++ b/runtimes/google/ipc/reserved.go
@@ -322,7 +322,7 @@
func copyMutableContext(ctx ipc.ServerContext) *mutableContext {
c := &mutableContext{T: ctx.Context()}
c.M.ContextParams.Copy(ctx)
- c.M.Blessings = ctx.Blessings()
+ c.M.GrantedBlessings = ctx.GrantedBlessings()
c.M.Server = ctx.Server()
return c
}
@@ -339,8 +339,8 @@
*context.T
M struct {
security.ContextParams
- Blessings security.Blessings
- Server ipc.Server
+ GrantedBlessings security.Blessings
+ Server ipc.Server
}
}
@@ -356,6 +356,6 @@
func (c *mutableContext) LocalEndpoint() naming.Endpoint { return c.M.LocalEndpoint }
func (c *mutableContext) RemoteEndpoint() naming.Endpoint { return c.M.RemoteEndpoint }
func (c *mutableContext) RemoteDischarges() map[string]security.Discharge { return c.M.RemoteDischarges }
-func (c *mutableContext) Blessings() security.Blessings { return c.M.Blessings }
+func (c *mutableContext) GrantedBlessings() security.Blessings { return c.M.GrantedBlessings }
func (c *mutableContext) Server() ipc.Server { return c.M.Server }
func (c *mutableContext) VanadiumContext() *context.T { return c.T }
diff --git a/runtimes/google/ipc/server.go b/runtimes/google/ipc/server.go
index f1f42f3..fe7c392 100644
--- a/runtimes/google/ipc/server.go
+++ b/runtimes/google/ipc/server.go
@@ -919,15 +919,15 @@
flow stream.Flow // underlying flow
// Fields filled in during the server invocation.
- clientBlessings security.Blessings
- ackBlessings bool
- blessings security.Blessings
- method, suffix string
- tags []*vdl.Value
- discharges map[string]security.Discharge
- starttime time.Time
- endStreamArgs bool // are the stream args at EOF?
- allowDebug bool // true if the caller is permitted to view debug information.
+ clientBlessings security.Blessings
+ ackBlessings bool
+ grantedBlessings security.Blessings
+ method, suffix string
+ tags []*vdl.Value
+ discharges map[string]security.Discharge
+ starttime time.Time
+ endStreamArgs bool // are the stream args at EOF?
+ allowDebug bool // true if the caller is permitted to view debug information.
}
var _ ipc.Stream = (*flowServer)(nil)
@@ -1153,7 +1153,7 @@
if err != nil {
return verror.New(verror.ErrBadProtocol, fs.T, newErrBadBlessings(fs.T, err))
}
- fs.blessings = blessings
+ fs.grantedBlessings = blessings
// Detect unusable blessings now, rather then discovering they are unusable on
// first use.
//
@@ -1293,9 +1293,9 @@
}
return fs.flow.RemoteBlessings()
}
-func (fs *flowServer) Blessings() security.Blessings {
+func (fs *flowServer) GrantedBlessings() security.Blessings {
//nologcall
- return fs.blessings
+ return fs.grantedBlessings
}
func (fs *flowServer) LocalEndpoint() naming.Endpoint {
//nologcall
diff --git a/services/mgmt/device/impl/app_service.go b/services/mgmt/device/impl/app_service.go
index 9876555..6caf213 100644
--- a/services/mgmt/device/impl/app_service.go
+++ b/services/mgmt/device/impl/app_service.go
@@ -591,7 +591,7 @@
dmPrincipal := call.LocalPrincipal()
// Take the blessings conferred upon us by the Start-er, extend them
// with the app title.
- grantedBlessings := call.Blessings()
+ grantedBlessings := call.GrantedBlessings()
if grantedBlessings.IsZero() {
return verror.New(ErrInvalidBlessing, nil)
}
diff --git a/services/mgmt/device/impl/claim.go b/services/mgmt/device/impl/claim.go
index 0c08075..2457031 100644
--- a/services/mgmt/device/impl/claim.go
+++ b/services/mgmt/device/impl/claim.go
@@ -34,7 +34,7 @@
return verror.New(ErrInvalidPairingToken, ctx.Context())
}
var (
- granted = ctx.Blessings() // blessings granted by the claimant
+ granted = ctx.GrantedBlessings() // blessings granted by the claimant
principal = ctx.LocalPrincipal()
store = principal.BlessingStore()
)
diff --git a/services/wsprd/app/app.go b/services/wsprd/app/app.go
index 57e15c5..f1e8bf3 100644
--- a/services/wsprd/app/app.go
+++ b/services/wsprd/app/app.go
@@ -383,7 +383,7 @@
return nil
}
func (l *localCall) Recv(interface{}) error { return nil }
-func (l *localCall) Blessings() security.Blessings { return security.Blessings{} }
+func (l *localCall) GrantedBlessings() security.Blessings { return security.Blessings{} }
func (l *localCall) Server() ipc.Server { return nil }
func (l *localCall) Context() *context.T { return l.ctx }
func (l *localCall) Timestamp() (t time.Time) { return }
diff --git a/tools/principal/main.go b/tools/principal/main.go
index e8ac474..0f0025e 100644
--- a/tools/principal/main.go
+++ b/tools/principal/main.go
@@ -854,7 +854,7 @@
}
func (r *recvBlessingsService) Grant(call ipc.StreamServerCall, token string) error {
- b := call.Blessings()
+ b := call.GrantedBlessings()
if b.IsZero() {
return fmt.Errorf("no blessings granted by sender")
}