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.
This commit is contained in:
Eric Blake 2011-08-02 13:04:19 -06:00
parent e4047f0a10
commit 94b5dae479
1 changed files with 1 additions and 1 deletions

View 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);