[libvirt] [PATCH 10/12] Set the identity for the access manager during API call dispatch
Eric Blake
eblake at redhat.com
Thu May 3 23:14:55 UTC 2012
On 05/02/2012 05:44 AM, Daniel P. Berrange wrote:
> From: "Daniel P. Berrange" <berrange at redhat.com>
>
> When dispatching an RPC API call, setup the access manager to hold
> the real & effective identities of the current server client whose
> RPC is being dispatched. The setting is thread-local, so only
> affects the API call in this thread
> ---
> src/rpc/virnetserverclient.c | 41 +++++++++++++++++++++++++++++++++++++++++
> src/rpc/virnetserverclient.h | 3 +++
> src/rpc/virnetserverprogram.c | 9 +++++++++
> 3 files changed, 53 insertions(+)
>
> *
> @@ -415,6 +418,12 @@ virNetServerProgramDispatchCall(virNetServerProgramPtr prog,
> */
> rv = (dispatcher->func)(server, client, msg, &rerr, arg, ret);
>
> + if (virNetServerClientDeactivateIdentity(client) < 0) {
> + virErrorPtr err = virGetLastError();
> + VIR_WARN("Failed to deactive identity %s", err ? err->message : "null");
s/deactive/deactivate/
--
Eric Blake eblake at redhat.com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120503/d95e9e34/attachment-0001.sig>
More information about the libvir-list
mailing list