From: Eric Blake Date: Tue, 2 Aug 2011 19:04:19 +0000 (-0600) Subject: rpc: correctly process sasl whitelist globs X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=94b5dae479c51e8cc457885b2fe92c0c104c4142;p=libvirt.git rpc: correctly process sasl whitelist globs Detected by Coverity. We want to compare the result of fnmatch 'rv', not our pre-set return value 'ret'. * src/rpc/virnetsaslcontext.c (virNetSASLContextCheckIdentity): Check correct variable. --- diff --git a/src/rpc/virnetsaslcontext.c b/src/rpc/virnetsaslcontext.c index a0752dd08d..ef36e2c325 100644 --- a/src/rpc/virnetsaslcontext.c +++ b/src/rpc/virnetsaslcontext.c @@ -132,7 +132,7 @@ int virNetSASLContextCheckIdentity(virNetSASLContextPtr ctxt, ret = 1; goto cleanup; /* Succesful match */ } - if (ret != FNM_NOMATCH) { + if (rv != FNM_NOMATCH) { virNetError(VIR_ERR_INTERNAL_ERROR, _("Malformed TLS whitelist regular expression '%s'"), *wildcards);