From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K6V6N-0003n9-5C for qemu-devel@nongnu.org; Wed, 11 Jun 2008 14:31:19 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K6V6L-0003mq-Pu for qemu-devel@nongnu.org; Wed, 11 Jun 2008 14:31:17 -0400 Received: from [199.232.76.173] (port=50497 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K6V6L-0003mn-Kw for qemu-devel@nongnu.org; Wed, 11 Jun 2008 14:31:17 -0400 Received: from nuitari.net ([67.205.71.108]:44291 helo=anvil.nuitari.net) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1K6V6L-0006hG-Mf for qemu-devel@nongnu.org; Wed, 11 Jun 2008 14:31:17 -0400 Date: Wed, 11 Jun 2008 14:35:28 -0400 (EDT) From: nuitari@melchior.nuitari.net Subject: Re: [Qemu-devel] Re: Problem(s) with encrypted images In-Reply-To: <01f001c8cb07$28c41d90$0201a8c0@zeug> Message-ID: References: <019c01c8cafe$d64f6310$0201a8c0@zeug> <01f001c8cb07$28c41d90$0201a8c0@zeug> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org >> qemu_key_check in vl.c does use monitor_readline, so you should see a >> "Password:" >> prompt in the monitor window (press ctrl-alt-2 to get there). > > The initialization order seems to be wrong in main() (vl.c): > > for(i = 0; i < nb_drives_opt; i++) > if (drive_init(&drives_opt[i], snapshot, machine) == -1) > exit(1); > ... > *_display_init(); > ... > monitor_init(); > > drive_init() got > ... > if (bdrv_open2(bdrv, file, bdrv_flags, drv) < 0 || qemu_key_check(bdrv, > file)) { > > and qemu_key_check depends on the monitor: > > term_printf("%s is encrypted.\n", name); > for(i = 0; i < 3; i++) { > monitor_readline("Password: ", 1, password, sizeof(password)); I've tried to simply reorder the drive_init after the monitor_init(), however it doesn't seem to read the password properly. Also connecting to VNC would make a segmentation fault.