diff --git a/daemon/remote.c b/daemon/remote.c index e7fe128a6f8a0c2b1a9e7c7a9cc4dc932434852e..35411f150fca0afacd0553df83e946861e02c127 100644 --- a/daemon/remote.c +++ b/daemon/remote.c @@ -2862,9 +2862,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);