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:
parent
e4047f0a10
commit
94b5dae479
@ -132,7 +132,7 @@ int virNetSASLContextCheckIdentity(virNetSASLContextPtr ctxt,
|
|||||||
ret = 1;
|
ret = 1;
|
||||||
goto cleanup; /* Succesful match */
|
goto cleanup; /* Succesful match */
|
||||||
}
|
}
|
||||||
if (ret != FNM_NOMATCH) {
|
if (rv != FNM_NOMATCH) {
|
||||||
virNetError(VIR_ERR_INTERNAL_ERROR,
|
virNetError(VIR_ERR_INTERNAL_ERROR,
|
||||||
_("Malformed TLS whitelist regular expression '%s'"),
|
_("Malformed TLS whitelist regular expression '%s'"),
|
||||||
*wildcards);
|
*wildcards);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user