veyron/runtimes/google/rt: Fix up some loose ends on principal initialization.
(1) If VEYRON_CREDENTIALS is specified but does not exist, create the directory.
(2) Be more descriptive about errors in loading VEYRON_CREDENTIALS
(3) When initializing a default blessing, also mark it as the one to be
shared with all principals. Without this, applications would not be able
to act as IPC clients (using the new security model) without an explicit
call to Runtime.Principal().BlessingStore().Set(). This change just flips
the default, so that a newly minted Principal is ready to be used both
as a client and server, and if it does not want to share credentials
with all servers it connects to, the application can call
Runtime.Principal().BlessingStore().Set(nil, security.AllPrincipals)
Change-Id: Ic2d10e66ea66b3d6b475aeaaf854a794da19ce28
2 files changed