1. 08 3月, 2009 24 次提交
  2. 07 3月, 2009 16 次提交
    • B
      Sparse fixes: add extern to ELF opcode tables to avoid warnings · 50773fd2
      blueswir1 提交于
      git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6740 c046a42c-6fe2-441c-8c8c-71466251a162
      50773fd2
    • B
      Sparse fixes: remove duplicate entry · e6f2870e
      blueswir1 提交于
      git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6739 c046a42c-6fe2-441c-8c8c-71466251a162
      e6f2870e
    • B
      Sparse fixes: move ACPI table definitions to pc.h · 80deece2
      blueswir1 提交于
      
      git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6738 c046a42c-6fe2-441c-8c8c-71466251a162
      80deece2
    • B
      Sparse fixes: truncation by cast · 9e622b15
      blueswir1 提交于
      Fix Sparse warnings about constant truncation caused by cast
      
      
      git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6737 c046a42c-6fe2-441c-8c8c-71466251a162
      9e622b15
    • B
      Sparse fixes: NULL use, header order, ANSI prototypes, static · 511d2b14
      blueswir1 提交于
      Fix Sparse warnings:
       * use NULL instead of plain 0
       * rearrange header include order to avoid redefining types accidentally
       * ANSIfy SLIRP
       * avoid "restrict" keyword
       * add static
      
      
      
      git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6736 c046a42c-6fe2-441c-8c8c-71466251a162
      511d2b14
    • P
      The _exit syscall is used for both thread termination in NPTL applications, · c2764719
      pbrook 提交于
      and process termination in legacy applications.  Try to guess which we want
      based on the presence of multiple threads.
      
      Also implement locking when modifying the CPU list.
      Signed-off-by: NPaul Brook <paul@codesourcery.com>
      
      
      git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6735 c046a42c-6fe2-441c-8c8c-71466251a162
      c2764719
    • B
      Fix BSD user · 0b8a988c
      blueswir1 提交于
      git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6734 c046a42c-6fe2-441c-8c8c-71466251a162
      0b8a988c
    • B
      Fix sparc64-softmmu breakage from r6711 · b4950060
      blueswir1 提交于
      git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6733 c046a42c-6fe2-441c-8c8c-71466251a162
      b4950060
    • A
      pc-bios/Makefile: add a rule to produce dtb files · 10aa630a
      aurel32 提交于
      Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
      
      git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6732 c046a42c-6fe2-441c-8c8c-71466251a162
      10aa630a
    • A
      Add more missing files · 274b6fcc
      aliguori 提交于
      Major FAIL with my checkin scripts.
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      
      
      
      git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6731 c046a42c-6fe2-441c-8c8c-71466251a162
      274b6fcc
    • A
      Add missing file from previous commit · 5f5aed22
      aliguori 提交于
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      
      
      
      git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6730 c046a42c-6fe2-441c-8c8c-71466251a162
      5f5aed22
    • A
      Fix race condition on access to env->interrupt_request · be214e6c
      aurel32 提交于
      env->interrupt_request is accessed as the bit level from both main code
      and signal handler, making a race condition possible even on CISC CPU.
      This causes freeze of QEMU under high load when running the dyntick
      clock.
      
      The patch below move the bit corresponding to CPU_INTERRUPT_EXIT in a
      separate variable, declared as volatile sig_atomic_t, so it should be
      work even on RISC CPU.
      
      We may want to move the cpu_interrupt(env, CPU_INTERRUPT_EXIT) case in
      its own function and get rid of CPU_INTERRUPT_EXIT. That can be done
      later, I wanted to keep the patch short for easier review.
      Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
      
      git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6728 c046a42c-6fe2-441c-8c8c-71466251a162
      be214e6c
    • A
      Remove tabs introduced from VNC ACL series · 28a76be8
      aliguori 提交于
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      
      
      git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6727 c046a42c-6fe2-441c-8c8c-71466251a162
      28a76be8
    • A
      Support ACLs for controlling VNC access ("Daniel P. Berrange") · 76655d6d
      aliguori 提交于
      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: NDaniel P. Berrange <berrange@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      
      
      git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6726 c046a42c-6fe2-441c-8c8c-71466251a162
      76655d6d
    • A
      Include auth credentials in 'info vnc' ("Daniel P. Berrange") · 1263b7d6
      aliguori 提交于
      This patch extends the 'info vnc' monitor output to include information
      about the VNC client authentication credentials.
      
      For clients authenticated using SASL, this will output the username.
      
      For clients authenticated using x509 certificates, this will output
      the x509 distinguished name.
      
      Auth can be stacked, so both username & x509 dname may be shown.
      
          Server:
               address: 0.0.0.0:5902
                  auth: vencrypt+x509+sasl
          Client:
               address: 10.33.6.67:38621
            x509 dname: C=GB,O=ACME,L=London,ST=London,CN=localhost
              username: admin
          Client:
               address: 10.33.6.63:38620
            x509 dname: C=GB,O=ACME,L=London,ST=London,CN=localhost
              username: admin
      
      
      
       vnc-tls.c |   17 +++++++++++++++++
       vnc-tls.h |    3 +++
       vnc.c     |   19 +++++++++++++++++--
       3 files changed, 37 insertions(+), 2 deletions(-)
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      
      
      git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6725 c046a42c-6fe2-441c-8c8c-71466251a162
      1263b7d6
    • A
      Add SASL authentication support ("Daniel P. Berrange") · 2f9606b3
      aliguori 提交于
      This patch adds the new SASL authentication protocol to the VNC server.
      
      It is enabled by setting the 'sasl' flag when launching VNC. SASL can
      optionally provide encryption via its SSF layer, if a suitable mechanism
      is configured (eg, GSSAPI/Kerberos, or Digest-MD5).  If an SSF layer is
      not available, then it should be combined with the x509 VNC authentication
      protocol which provides encryption.
      
      eg, if using GSSAPI
      
         qemu -vnc localhost:1,sasl
      
      eg if using  TLS/x509 for encryption
      
         qemu -vnc localhost:1,sasl,tls,x509
      
      
      By default the Cyrus SASL library will look for its configuration in
      the file /etc/sasl2/qemu.conf.  For non-root users, this can be overridden
      by setting the SASL_CONF_PATH environment variable, eg to make it look in
      $HOME/.sasl2.  NB unprivileged users may not have access to the full range
      of SASL mechanisms, since some of them require some administrative privileges
      to configure. The patch includes an example SASL configuration file which
      illustrates config for GSSAPI and Digest-MD5, though it should be noted that
      the latter is not really considered secure any more.
      
      Most of the SASL authentication code is located in a separate source file,
      vnc-auth-sasl.c.  The main vnc.c file only contains minimal integration
      glue, specifically parsing of command line flags / setup, and calls to
      start the SASL auth process, to do encoding/decoding for data.
      
      There are several possible stacks for reading & writing of data, depending
      on the combo of VNC authentication methods in use
      
       - Clear.    read/write straight to socket
       - TLS.      read/write via GNUTLS helpers
       - SASL.     encode/decode via SASL SSF layer, then read/write to socket
       - SASL+TLS. encode/decode via SASL SSF layer, then read/write via GNUTLS
      
      Hence, the vnc_client_read & vnc_client_write methods have been refactored
      a little.
      
         vnc_client_read:  main entry point for reading, calls either
      
             - vnc_client_read_plain   reading, with no intermediate decoding
             - vnc_client_read_sasl    reading, with SASL SSF decoding
      
         These two methods, then call vnc_client_read_buf(). This decides
         whether to write to the socket directly or write via GNUTLS.
      
      The situation is the same for writing data. More extensive comments
      have been added in the code / patch. The vnc_client_read_sasl and
      vnc_client_write_sasl method implementations live in the separate
      vnc-auth-sasl.c file.
      
      The state required for the SASL auth mechanism is kept in a separate
      VncStateSASL struct, defined in vnc-auth-sasl.h and included in the
      main VncState.
      
      The configure script probes for SASL and automatically enables it
      if found, unless --disable-vnc-sasl was given to override it.
      
      
       Makefile            |    7 
       Makefile.target     |    5 
       b/qemu.sasl         |   34 ++
       b/vnc-auth-sasl.c   |  626 ++++++++++++++++++++++++++++++++++++++++++++++++++++
       b/vnc-auth-sasl.h   |   67 +++++
       configure           |   34 ++
       qemu-doc.texi       |   97 ++++++++
       vnc-auth-vencrypt.c |   12 
       vnc.c               |  249 ++++++++++++++++++--
       vnc.h               |   31 ++
       10 files changed, 1129 insertions(+), 33 deletions(-)
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      
      
      git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6724 c046a42c-6fe2-441c-8c8c-71466251a162
      2f9606b3