]> xenbits.xensource.com Git - libvirt.git/commitdiff
rpc: correctly process sasl whitelist globs
authorEric Blake <eblake@redhat.com>
Tue, 2 Aug 2011 19:04:19 +0000 (13:04 -0600)
committerEric Blake <eblake@redhat.com>
Tue, 2 Aug 2011 21:01:33 +0000 (15:01 -0600)
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.

src/rpc/virnetsaslcontext.c

index a0752dd08dea7480ba52a4f51b6827743023285c..ef36e2c325d00c325ce6cc8c16f64ed61b59dd0a 100644 (file)
@@ -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);