[PATCH 6/7] util: Check for pkttyagent availability properly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 src/util/virpolkit.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/util/virpolkit.c b/src/util/virpolkit.c
index 63bb8133a8aa..7156adc10c0a 100644
--- a/src/util/virpolkit.c
+++ b/src/util/virpolkit.c
@@ -180,9 +180,9 @@ virPolkitAgentCreate(void)
     int outfd = STDOUT_FILENO;
     int errfd = STDERR_FILENO;
 
-    if (!isatty(STDIN_FILENO)) {
+    if (!virPolkitAgentAvailable()) {
         virReportError(VIR_ERR_SYSTEM_ERROR, "%s",
-                       _("Cannot start polkit text agent without a tty"));
+                       _("polkit text authentication agent unavailable"));
         goto error;
     }
 
-- 
2.34.0




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux