rpc: First test if authentication is required
This makes the code more efficient. Signed-off-by: Marc Hartmayer <mhartmay@linux.vnet.ibm.com> Reviewed-by: Bjoern Walk <bwalk@linux.vnet.ibm.com> Reviewed-by: Boris Fiuczynski <fiuczy@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:
parent
ee8bb0511d
commit
c10103e941
@ -400,8 +400,8 @@ virNetServerProgramDispatchCall(virNetServerProgramPtr prog,
|
|||||||
/* If client is marked as needing auth, don't allow any RPC ops
|
/* If client is marked as needing auth, don't allow any RPC ops
|
||||||
* which are except for authentication ones
|
* which are except for authentication ones
|
||||||
*/
|
*/
|
||||||
if (virNetServerClientNeedAuth(client) &&
|
if (dispatcher->needAuth &&
|
||||||
dispatcher->needAuth) {
|
virNetServerClientNeedAuth(client)) {
|
||||||
/* Explicitly *NOT* calling remoteDispatchAuthError() because
|
/* Explicitly *NOT* calling remoteDispatchAuthError() because
|
||||||
we want back-compatibility with libvirt clients which don't
|
we want back-compatibility with libvirt clients which don't
|
||||||
support the VIR_ERR_AUTH_FAILED error code */
|
support the VIR_ERR_AUTH_FAILED error code */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user