On Fri, Dec 15, 2017 at 02:45 PM +0100, John Ferlan <jferlan(a)redhat.com> wrote:
On 12/12/2017 06:36 AM, Marc Hartmayer wrote:
> Additionally, use a whitelist model to decide whether authentication
> is needed or not.
>
> Signed-off-by: Marc Hartmayer <mhartmay(a)linux.vnet.ibm.com>
> Reviewed-by: Boris Fiuczynski <fiuczy(a)linux.vnet.ibm.com>
> Reviewed-by: Bjoern Walk <bwalk(a)linux.vnet.ibm.com>
> Reviewed-by: Stefan Zimmermann <stzi(a)linux.vnet.ibm.com>
> ---
> src/rpc/virnetserverclient.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
Considering later patches... Why not introduce the Locked version here
which just returns (client->auth == VIR_NET_SERVER_SERVICE_AUTH_NONE)?
and of course alter the commit message to say Introduce *Locked.
Yep makes sense. Will change it.
Hazards of not peeking forward by me.
John
> diff --git a/src/rpc/virnetserverclient.c b/src/rpc/virnetserverclient.c
> index b454a3ff6992..0ee299e2d6ec 100644
> --- a/src/rpc/virnetserverclient.c
> +++ b/src/rpc/virnetserverclient.c
> @@ -1512,10 +1512,10 @@ int virNetServerClientSendMessage(virNetServerClientPtr
client,
>
> bool virNetServerClientNeedAuth(virNetServerClientPtr client)
> {
> - bool need = false;
> + bool need = true;
> virObjectLock(client);
> - if (client->auth)
> - need = true;
> + if (client->auth == VIR_NET_SERVER_SERVICE_AUTH_NONE)
> + need = false;
> virObjectUnlock(client);
> return need;
> }
>
--
Beste Grüße / Kind regards
Marc Hartmayer
IBM Deutschland Research & Development GmbH
Vorsitzende des Aufsichtsrats: Martina Koederitz
Geschäftsführung: Dirk Wittkopp
Sitz der Gesellschaft: Böblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294