mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 04:25:18 +00:00
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
|
||||
* which are except for authentication ones
|
||||
*/
|
||||
if (virNetServerClientNeedAuth(client) &&
|
||||
dispatcher->needAuth) {
|
||||
if (dispatcher->needAuth &&
|
||||
virNetServerClientNeedAuth(client)) {
|
||||
/* Explicitly *NOT* calling remoteDispatchAuthError() because
|
||||
we want back-compatibility with libvirt clients which don't
|
||||
support the VIR_ERR_AUTH_FAILED error code */
|
||||
|
Loading…
x
Reference in New Issue
Block a user