rpc: Use the enum value instead of a numerical value

Signed-off-by: Marc Hartmayer <mhartmay@linux.vnet.ibm.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com>
Reviewed-by: Bjoern Walk <bwalk@linux.vnet.ibm.com>
Reviewed-by: Stefan Zimmermann <stzi@linux.vnet.ibm.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
This commit is contained in:
Marc Hartmayer 2017-12-21 15:28:58 +01:00 committed by John Ferlan
parent 4ec8baf30f
commit ed88b37fb4

View File

@ -3268,7 +3268,7 @@ remoteDispatchAuthList(virNetServerPtr server,
(long long) callerPid, (int) callerUid) < 0)
goto cleanup;
VIR_INFO("Bypass polkit auth for privileged client %s", ident);
virNetServerClientSetAuth(client, 0);
virNetServerClientSetAuth(client, VIR_NET_SERVER_SERVICE_AUTH_NONE);
virNetServerTrackCompletedAuth(server);
auth = VIR_NET_SERVER_SERVICE_AUTH_NONE;
VIR_FREE(ident);
@ -3414,7 +3414,7 @@ remoteSASLFinish(virNetServerPtr server,
if (!(clnt_identity = virNetServerClientGetIdentity(client)))
goto error;
virNetServerClientSetAuth(client, 0);
virNetServerClientSetAuth(client, VIR_NET_SERVER_SERVICE_AUTH_NONE);
virNetServerTrackCompletedAuth(server);
virNetServerClientSetSASLSession(client, priv->sasl);
virIdentitySetSASLUserName(clnt_identity, identity);
@ -3738,7 +3738,7 @@ remoteDispatchAuthPolkit(virNetServerPtr server,
action, (long long) callerPid, callerUid);
ret->complete = 1;
virNetServerClientSetAuth(client, 0);
virNetServerClientSetAuth(client, VIR_NET_SERVER_SERVICE_AUTH_NONE);
virNetServerTrackCompletedAuth(server);
virMutexUnlock(&priv->lock);