if (ret != NULL)
return ret;
+ if (!auth) {
+ virReportError(VIR_ERR_INVALID_ARG, "%s",
+ _("Missing authentication credentials"));
+ return NULL;
+ }
+
memset(&cred, 0, sizeof(virConnectCredential));
if (defaultUsername != NULL) {
if (ret != NULL)
return ret;
+ if (!auth) {
+ virReportError(VIR_ERR_INVALID_ARG, "%s",
+ _("Missing authentication credentials"));
+ return NULL;
+ }
+
memset(&cred, 0, sizeof(virConnectCredential));
if (virAsprintf(&prompt, _("Enter %s's password for %s"), username,