mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
util: Check for pkttyagent availability properly
It does not need a tty to work, it opens its controlling terminal for user interaction and with this patch even crazy things like this work: echo 'list --name' | virsh -q >/dev/null Signed-off-by: Martin Kletzander <mkletzan@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
32eae6fd31
commit
00c0ba5de3
@ -180,9 +180,9 @@ virPolkitAgentCreate(void)
|
|||||||
int outfd = STDOUT_FILENO;
|
int outfd = STDOUT_FILENO;
|
||||||
int errfd = STDERR_FILENO;
|
int errfd = STDERR_FILENO;
|
||||||
|
|
||||||
if (!isatty(STDIN_FILENO)) {
|
if (!virPolkitAgentAvailable()) {
|
||||||
virReportError(VIR_ERR_SYSTEM_ERROR, "%s",
|
virReportError(VIR_ERR_SYSTEM_ERROR, "%s",
|
||||||
_("Cannot start polkit text agent without a tty"));
|
_("polkit text authentication agent unavailable"));
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user