Sander Hoentjen has uploaded a new change for review.

Change subject: Use vncviewer passwordFile instead of passwdInput
......................................................................

Use vncviewer passwordFile instead of passwdInput

Fedora 18 has dropped the patch to add passwdInput option to tigervnc

Change-Id: I76178f15217c421d88879c88534d7cb3a7583426
Signed-off-by: Sander Hoentjen <[email protected]>
---
M src/ovirtcli/platform/posix/vnc.py
1 file changed, 5 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine-cli refs/changes/57/11857/1

diff --git a/src/ovirtcli/platform/posix/vnc.py 
b/src/ovirtcli/platform/posix/vnc.py
index f6919ab..456217a 100644
--- a/src/ovirtcli/platform/posix/vnc.py
+++ b/src/ovirtcli/platform/posix/vnc.py
@@ -19,6 +19,7 @@
 from cli.error import Error
 from ovirtcli.platform import util
 from cli.messages import Messages
+from subprocess import *
 
 
 def launch_vnc_viewer(host, port, ticket, debug=False):
@@ -29,7 +30,9 @@
     cmd = util.which('vncviewer')
     if cmd is None:
         raise Error, Messages.Error.NO_CONSOLE_FOUND % ('vnc', 'vnc')
-    args = ['vncviewer', '%s::%s' % (host, port), '-passwdInput' ]
+    p = Popen(["vncpasswd", "-f"], shell=False, stdin=PIPE, stdout=PIPE)
+    pwd = p.communicate(input=ticket)[0]
+    args = ['vncviewer', '%s::%s' % (host, port), '-passwordFile', 
'/dev/stdin' ]
     pid, pstdin = util.spawn(cmd, args, debug)
-    os.write(pstdin, ticket)
+    os.write(pstdin, pwd)
     os.close(pstdin)


--
To view, visit http://gerrit.ovirt.org/11857
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I76178f15217c421d88879c88534d7cb3a7583426
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine-cli
Gerrit-Branch: master
Gerrit-Owner: Sander Hoentjen <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to