mirror of https://gitee.com/openkylin/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.
This commit is contained in:
parent
e4047f0a10
commit
94b5dae479
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue