Bug #463
tty_expect doesn't wait to issue password
Status: | Closed | Start date: | 01/11/2011 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | Tino Vázquez | % Done: | 0% | |
Category: | - | |||
Target version: | Release 2.2 | |||
Resolution: | Pull request: | |||
Affected Versions: |
Description
This causes virsh to not cope and hangs the process. From Pham Kim Long <longpk@fpt.net>
--
we found out that tty_expect.c in the vmware driver is the issue. The user and password are sent from tty_expect to virsh in quick succession. Therefore virsh can't process the password and waits for it forever. I fixed it by adding a sleep in between.
Here's the fix:
- /tmp/vmware-1.0/src/tty_expect/tty_expect.c 2010-10-27 21:12:59.000000000 +0700
--- tty_expect.c 2011-01-11 14:00:56.615343235 +0700 ******* - 159,166 **
--- 159,168 ----
}expect_char(pty,&expect,1);
+ sleep(1);
write_answer(pty,username);
expect_char(pty,&expect,1);
+ sleep(1);
write_answer(pty,password);expect_char(pty,0,0);
Associated revisions
History
#1 Updated by Tino Vázquez over 10 years ago
- Status changed from Assigned to Closed