mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 04:25:18 +00:00
libvirt: ensure defresult is used in virConnectAuthCallbackDefault
A previous change to this function's password handling broke the use of default values for credential types other than VIR_CRED_PASSPHRASE and VIR_CRED_NOECHOPROMPT. Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Neal Gompa <ngompa13@gmail.com> Signed-off-by: Matt Coleman <matt@datto.com>
This commit is contained in:
parent
81a9194cbf
commit
1bb9f872a0
@ -146,7 +146,9 @@ virConnectAuthCallbackDefault(virConnectCredentialPtr cred,
|
||||
len = strlen(buf);
|
||||
if (len != 0 && buf[len-1] == '\n')
|
||||
buf[len-1] = '\0';
|
||||
bufptr = g_strdup(buf);
|
||||
|
||||
if (strlen(buf) > 0)
|
||||
bufptr = g_strdup(buf);
|
||||
break;
|
||||
|
||||
case VIR_CRED_PASSPHRASE:
|
||||
|
Loading…
x
Reference in New Issue
Block a user