diff --git a/daemon/remote.c b/daemon/remote.c index 41b8ea860d90e87ae18c891fa743f832018d16bb..d3c5c1098c7b868fdf722e755ff2fac0fca7cf47 100644 --- a/daemon/remote.c +++ b/daemon/remote.c @@ -2887,9 +2887,10 @@ error: if (authdismissed) { virReportError(VIR_ERR_AUTH_CANCELLED, "%s", _("authentication cancelled by user")); + } else if (pkout && *pkout) { + virReportError(VIR_ERR_AUTH_FAILED, _("polkit: %s"), pkout); } else { - virReportError(VIR_ERR_AUTH_FAILED, "%s", - pkout && *pkout ? pkout : _("authentication failed")); + virReportError(VIR_ERR_AUTH_FAILED, "%s", _("authentication failed")); } VIR_FREE(pkout);