• In case you're wondering what connections exactly you have open
    or maybe redir'ed in the past, you can't really find out from qemu
    right now.
    
    This patch enables you to see all current connections the host
    only networking holds open, so you can kill them using the previous
    patch.
    
    Signed-off-by: Alexander Graf <agraf@suse.de>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Alexander Graf authored
     
    Browse Code »

  • Using the new host_net_redir command you can easily create redirections
    on the fly while your VM is running.
    
    While that's great, it's missing the removal of redirections, in case you
    want to have a port closed again at a later point in time.
    
    This patch adds support for removal of redirections.
    
    Signed-off-by: Alexander Graf <agraf@suse.de>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Alexander Graf authored
     
    Browse Code »

  • This is no user-flippable switch, and no arch makes use of disabling
    gdbstub support. So it's pointless to keep the related #ifdefs and
    configure hunks around - and risking breakages like 711c410fdd again.
    
    Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
    Jan Kiszka authored
     
    Browse Code »

  • Here is an updated hardware watchdog patch, which should fix
    everything that was raised about the previous version ...
    
    Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Richard W.M. Jones authored
     
    Browse Code »











  • Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    
    
    git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6727 c046a42c-6fe2-441c-8c8c-71466251a162
    aliguori authored
     
    Browse Code »
  • This patch introduces a generic internal API for access control lists
    to be used by network servers in QEMU. It adds support for checking
    these ACL in the VNC server, in two places. The first ACL is for the
    SASL authentication mechanism, checking the SASL username. This ACL
    is called 'vnc.username'. The second is for the TLS authentication
    mechanism, when x509 client certificates are turned on, checking against
    the Distinguished Name of the client. This ACL is called 'vnc.x509dname'
    
    The internal API provides for an ACL with the following characteristics
    
     - A unique name, eg  vnc.username, and vnc.x509dname.
     - A default policy, allow or deny
     - An ordered series of match rules, with allow or deny policy
    
    If none of the match rules apply, then the default policy is
    used.
    
    There is a monitor API to manipulate the ACLs, which I'll describe via
    examples
    
      (qemu) acl show vnc.username
      policy: allow
      (qemu) acl policy vnc.username denya
      acl: policy set to 'deny'
      (qemu) acl allow vnc.username fred
      acl: added rule at position 1
      (qemu) acl allow vnc.username bob
      acl: added rule at position 2
      (qemu) acl allow vnc.username joe 1
      acl: added rule at position 1
      (qemu) acl show vnc.username
      policy: deny
      0: allow fred
      1: allow joe
      2: allow bob
    
    
      (qemu) acl show vnc.x509dname
      policy: allow
      (qemu) acl policy vnc.x509dname deny
      acl: policy set to 'deny'
      (qemu) acl allow vnc.x509dname C=GB,O=ACME,L=London,CN=*
      acl: added rule at position 1
      (qemu) acl allow vnc.x509dname C=GB,O=ACME,L=Boston,CN=bob
      acl: added rule at position 2
      (qemu) acl show vnc.x509dname
      policy: deny
      0: allow C=GB,O=ACME,L=London,CN=*
      1: allow C=GB,O=ACME,L=Boston,CN=bob
    
    By default the VNC server will not use any ACLs, allowing access to
    the server if the user successfully authenticates. To enable use of
    ACLs to restrict user access, the ',acl' flag should be given when
    starting QEMU. The initial ACL activated will be a 'deny all' policy
    and should be customized using monitor commands.
    
    eg enable SASL auth and ACLs
    
        qemu ....  -vnc localhost:1,sasl,acl
    
    The next patch will provide a way to load a pre-defined ACL when
    starting up
    
    
     Makefile        |    6 +
     b/acl.c         |  185 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
     b/acl.h         |   74 ++++++++++++++++++++++
     configure       |   18 +++++
     monitor.c       |   95 ++++++++++++++++++++++++++++
     qemu-doc.texi   |   49 ++++++++++++++
     vnc-auth-sasl.c |   16 +++-
     vnc-auth-sasl.h |    7 ++
     vnc-tls.c       |   19 +++++
     vnc-tls.h       |    3 
     vnc.c           |   21 ++++++
     vnc.h           |    3 
     12 files changed, 491 insertions(+), 5 deletions(-)
    
       Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    
    
    git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6726 c046a42c-6fe2-441c-8c8c-71466251a162
    aliguori authored
     
    Browse Code »

  • This allows to create monitor terminals that do not make use of the
    interactive readline back-end but rather send complete commands. The
    pass-through monitor interface of the gdbstub will be an example.
    
    Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    
    
    git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6717 c046a42c-6fe2-441c-8c8c-71466251a162
    aliguori authored
     
    Browse Code »
  • Up to now, you never really knew if you already switched the console
    after pressing CTRL-A C or if you mistyped it again. This patch
    clarifies the situation by providing a prompt in a new line and
    injecting a linebreak when switching away again. For this purpose, the
    two events CHR_EVENT_MUX_IN and CHR_EVENT_MUX_OUT are introduced and
    distributed on focus switches.
    
    Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    
    
    git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6716 c046a42c-6fe2-441c-8c8c-71466251a162
    aliguori authored
     
    Browse Code »
  • Currently all registered (and activate) monitor terminals work in
    broadcast mode: Everyone sees what someone else types on some other
    terminal and what the monitor reports back. This model is broken when
    you have a management monitor terminal that is automatically operated
    and some other terminal used for independent guest inspection. Such
    additional terminals can be multiplexed device channels or a gdb
    frontend connected to QEMU's stub.
    
    Therefore, this patch decouples the buffers and states of all monitor
    terminals, allowing the user to operate them independently. It finally
    starts to use the 'mon' parameter that was introduced earlier with the
    API rework. It also defines the default monitor: the first instantance
    that has the MONITOR_IS_DEFAULT flag set, and that is the monitor
    created via the "-monitor" command line switch (or "vc" if none is
    given).
    
    As the patch requires to rework the monitor suspension interface, it
    also takes the freedom to make it "truely" suspending (so far suspending
    meant suppressing the prompt, but inputs were still processed).
    
    Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    
    
    git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6715 c046a42c-6fe2-441c-8c8c-71466251a162
    aliguori authored
     
    Browse Code »
  • As another step towards decoupled monitor terminals encapsulate the
    state of the readline processor in a separate data structure called
    ReadLineState and adapt all interfaces appropriately. For now the
    monitor continues to instantiate just a single readline state.
    
    Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    
    
    git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6714 c046a42c-6fe2-441c-8c8c-71466251a162
    aliguori authored
     
    Browse Code »
  • There is no use for the hide/show banner option, and it is applied
    inconsistently anyway (or what makes the difference between
     -serial mon:stdio and -nographic for the monitor?). So drop this mode.
    
    Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    
    
    git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6713 c046a42c-6fe2-441c-8c8c-71466251a162
    aliguori authored
     
    Browse Code »
  • Remove the static MAX_MON limit by managing monitor terminals in a
    linked list.
    
    Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    
    
    git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6712 c046a42c-6fe2-441c-8c8c-71466251a162
    aliguori authored
     
    Browse Code »
  • Refactor the monitor API and prepare it for decoupled terminals:
    term_print functions are renamed to monitor_* and all monitor services
    gain a new parameter (mon) that will once refer to the monitor instance
    the output is supposed to appear on. However, the argument remains
    unused for now. All monitor command callbacks are also extended by a mon
    parameter so that command handlers are able to pass an appropriate
    reference to monitor output services.
    
    For the case that monitor outputs so far happen without clearly
    identifiable context, the global variable cur_mon is introduced that
    shall once provide a pointer either to the current active monitor (while
    processing commands) or to the default one. On the mid or long term,
    those use case will be obsoleted so that this variable can be removed
    again.
    
    Due to the broad usage of the monitor interface, this patch mostly deals
    with converting users of the monitor API. A few of them are already
    extended to pass 'mon' from the command handler further down to internal
    functions that invoke monitor_printf.
    
    At this chance, monitor-related prototypes are moved from console.h to
    a new monitor.h. The same is done for the readline API.
    
    Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    
    
    git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6711 c046a42c-6fe2-441c-8c8c-71466251a162
    aliguori authored
     
    Browse Code »
  • Currently, waiting for the user to type in some password blocks the
    whole VM because monitor_readline starts its own I/O loop. And this loop
    also screws up reading passwords from virtual console.
    
    Patch below fixes the shortcomings by using normal I/O processing also
    for waiting on a password. To keep to modal property for the monitor
    terminal, the command handler is temporarily replaced by a password
    handler and a callback infrastructure is established to process the
    result before switching back to command mode.
    
    Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    
    
    git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6710 c046a42c-6fe2-441c-8c8c-71466251a162
    aliguori authored
     
    Browse Code »
  • Break readline_show_prompt out of readline_start so that (re-)printing
    the prompt can be controlled in a more fine-grained way.
    
    Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    
    
    git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6709 c046a42c-6fe2-441c-8c8c-71466251a162
    aliguori authored
     
    Browse Code »
  • Drop the hack to query passwords on all monitor terminals now that they
    are requested when the user initially enters 'continue'.
    
    Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    
    
    git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6708 c046a42c-6fe2-441c-8c8c-71466251a162
    aliguori authored
     
    Browse Code »
  • Reading the passwords for encrypted hard disks during early startup is
    broken (I guess for quiet a while now):
     - No monitor terminal is ready for input at this point
     - Forcing all mux'ed terminals into monitor mode can confuse other
       users of that channels
    
    To overcome these issues and to lay the ground for a clean decoupling of
    monitor terminals, this patch changes the initial password inquiry as
    follows:
     - Prevent autostart if there is some encrypted disk
     - Once the user tries to resume the VM, prompt for all missing
       passwords
     - Only resume if all passwords were accepted
    
    Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    
    
    git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6707 c046a42c-6fe2-441c-8c8c-71466251a162
    aliguori authored
     
    Browse File »
  • Make bdrv_iterate more useful by passing the BlockDriverState to the
    iterator instead of the device name.
    
    Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    
    
    git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6703 c046a42c-6fe2-441c-8c8c-71466251a162
    aliguori authored
     
    Browse File »