]> git.proxmox.com Git - pve-qemu-kvm.git/blobdiff - debian/patches/pve-auth.patch
update to qemu 1.3 rc1
[pve-qemu-kvm.git] / debian / patches / pve-auth.patch
index 341912e159c578329e329388be86acde94f16c83..241cd79e9303682167e39441100ba8f94e24a895 100644 (file)
@@ -1,7 +1,7 @@
 Index: new/ui/vnc.c
 ===================================================================
---- new.orig/ui/vnc.c  2012-09-24 07:15:22.000000000 +0200
-+++ new/ui/vnc.c       2012-09-24 07:15:24.000000000 +0200
+--- new.orig/ui/vnc.c  2012-11-21 11:25:33.000000000 +0100
++++ new/ui/vnc.c       2012-11-21 11:32:25.000000000 +0100
 @@ -43,6 +43,125 @@
  #include "vnc_keysym.h"
  #include "d3des.h"
@@ -128,16 +128,7 @@ Index: new/ui/vnc.c
  static VncDisplay *vnc_display; /* needed for info vnc */
  static DisplayChangeListener *dcl;
  
-@@ -1891,7 +2010,7 @@
- static void set_pixel_conversion(VncState *vs)
- {
-     if ((vs->clientds.flags & QEMU_BIG_ENDIAN_FLAG) ==
--        (vs->ds->surface->flags & QEMU_BIG_ENDIAN_FLAG) && 
-+        (vs->ds->surface->flags & QEMU_BIG_ENDIAN_FLAG) &&
-         !memcmp(&(vs->clientds.pf), &(vs->ds->surface->pf), sizeof(PixelFormat))) {
-         vs->write_pixels = vnc_write_pixels_copy;
-         vnc_hextile_set_pixel_conversion(vs, 0);
-@@ -1980,7 +2099,7 @@
+@@ -1982,7 +2101,7 @@
          vnc_write_u8(vs, VNC_MSG_SERVER_FRAMEBUFFER_UPDATE);
          vnc_write_u8(vs, 0);
          vnc_write_u16(vs, 1); /* number of rects */
@@ -146,7 +137,7 @@ Index: new/ui/vnc.c
                                 ds_get_height(vs->ds), VNC_ENCODING_WMVi);
          pixel_format_message(vs);
          vnc_unlock_output(vs);
-@@ -2875,7 +2994,7 @@
+@@ -2892,7 +3011,7 @@
  char *vnc_display_local_addr(DisplayState *ds)
  {
      VncDisplay *vs = ds ? (VncDisplay *)ds->opaque : vnc_display;
@@ -155,7 +146,7 @@ Index: new/ui/vnc.c
      return vnc_socket_local_addr("%s:%s", vs->lsock);
  }
  
-@@ -2934,6 +3053,7 @@
+@@ -2950,6 +3069,7 @@
              tls = 1; /* Require TLS */
          } else if (strncmp(options, "x509", 4) == 0) {
              char *start, *end;
@@ -163,24 +154,20 @@ Index: new/ui/vnc.c
              x509 = 1; /* Require x509 certificates */
              if (strncmp(options, "x509verify", 10) == 0)
                  vs->tls.x509verify = 1; /* ...and verify client certs */
-@@ -2956,10 +3076,12 @@
+@@ -2970,8 +3090,10 @@
                  }
                  g_free(path);
              } else {
--                fprintf(stderr, "No certificate path provided\n");
--                g_free(vs->display);
--                vs->display = NULL;
--                return -1;
+-                error_setg(errp, "No certificate path provided");
+-                goto fail;
 +              if (pve_tls_set_x509_creds_dir(vs) < 0) {
-+                      fprintf(stderr, "No certificate path provided\n");
-+                      g_free(vs->display);
-+                      vs->display = NULL;
-+                      return -1;
-+              }
++                    error_setg(errp, "No certificate path provided");
++                    goto fail;
++              } 
              }
  #endif
  #if defined(CONFIG_VNC_TLS) || defined(CONFIG_VNC_SASL)
-@@ -3025,10 +3147,10 @@
+@@ -3035,10 +3157,10 @@
              vs->auth = VNC_AUTH_VENCRYPT;
              if (x509) {
                  VNC_DEBUG("Initializing VNC server with x509 password auth\n");
@@ -195,8 +182,8 @@ Index: new/ui/vnc.c
  #endif /* CONFIG_VNC_TLS */
 Index: new/ui/vnc-auth-vencrypt.c
 ===================================================================
---- new.orig/ui/vnc-auth-vencrypt.c    2012-09-24 07:15:00.000000000 +0200
-+++ new/ui/vnc-auth-vencrypt.c 2012-09-24 07:15:24.000000000 +0200
+--- new.orig/ui/vnc-auth-vencrypt.c    2012-11-21 11:11:22.000000000 +0100
++++ new/ui/vnc-auth-vencrypt.c 2012-11-21 11:26:06.000000000 +0100
 @@ -25,7 +25,107 @@
   */
  
@@ -320,9 +307,9 @@ Index: new/ui/vnc-auth-vencrypt.c
         VNC_DEBUG("Start TLS auth VNC\n");
 Index: new/ui/vnc.h
 ===================================================================
---- new.orig/ui/vnc.h  2012-09-24 07:15:00.000000000 +0200
-+++ new/ui/vnc.h       2012-09-24 07:15:24.000000000 +0200
-@@ -263,6 +263,8 @@
+--- new.orig/ui/vnc.h  2012-11-21 11:11:22.000000000 +0100
++++ new/ui/vnc.h       2012-11-21 11:26:06.000000000 +0100
+@@ -264,6 +264,8 @@
      char challenge[VNC_AUTH_CHALLENGE_SIZE];
  #ifdef CONFIG_VNC_TLS
      int subauth; /* Used by VeNCrypt */
@@ -331,7 +318,7 @@ Index: new/ui/vnc.h
      VncStateTLS tls;
  #endif
  #ifdef CONFIG_VNC_SASL
-@@ -554,4 +556,6 @@
+@@ -560,4 +562,6 @@
  int vnc_zywrle_send_framebuffer_update(VncState *vs, int x, int y, int w, int h);
  void vnc_zrle_clear(VncState *vs);
  
@@ -340,8 +327,8 @@ Index: new/ui/vnc.h
  #endif /* __QEMU_VNC_H */
 Index: new/ui/vnc-tls.c
 ===================================================================
---- new.orig/ui/vnc-tls.c      2012-09-24 07:15:00.000000000 +0200
-+++ new/ui/vnc-tls.c   2012-09-24 07:15:24.000000000 +0200
+--- new.orig/ui/vnc-tls.c      2012-11-21 11:11:22.000000000 +0100
++++ new/ui/vnc-tls.c   2012-11-21 11:26:06.000000000 +0100
 @@ -302,6 +302,14 @@
  
  static int vnc_set_gnutls_priority(gnutls_session_t s, int x509)
@@ -396,8 +383,8 @@ Index: new/ui/vnc-tls.c
                                 const char *certdir)
 Index: new/ui/vnc-tls.h
 ===================================================================
---- new.orig/ui/vnc-tls.h      2012-09-24 07:15:00.000000000 +0200
-+++ new/ui/vnc-tls.h   2012-09-24 07:15:24.000000000 +0200
+--- new.orig/ui/vnc-tls.h      2012-11-21 11:11:22.000000000 +0100
++++ new/ui/vnc-tls.h   2012-11-21 11:26:06.000000000 +0100
 @@ -68,6 +68,8 @@
  
  int vnc_tls_validate_certificate(VncState *vs);
@@ -409,9 +396,9 @@ Index: new/ui/vnc-tls.h
  
 Index: new/vl.c
 ===================================================================
---- new.orig/vl.c      2012-09-24 07:15:20.000000000 +0200
-+++ new/vl.c   2012-09-24 07:15:24.000000000 +0200
-@@ -3133,6 +3133,7 @@
+--- new.orig/vl.c      2012-11-21 11:25:23.000000000 +0100
++++ new/vl.c   2012-11-21 11:26:06.000000000 +0100
+@@ -3319,6 +3319,7 @@
                    fprintf(stderr, "Invalid ID\n");
                    exit(1);
                }
@@ -421,13 +408,13 @@ Index: new/vl.c
                  cpuunits = atoi(optarg);
 Index: new/console.h
 ===================================================================
---- new.orig/console.h 2012-09-24 07:15:00.000000000 +0200
-+++ new/console.h      2012-09-24 07:15:24.000000000 +0200
-@@ -374,6 +374,7 @@
+--- new.orig/console.h 2012-11-21 11:11:22.000000000 +0100
++++ new/console.h      2012-11-21 11:26:06.000000000 +0100
+@@ -448,6 +448,7 @@
  void cocoa_display_init(DisplayState *ds, int full_screen);
  
  /* vnc.c */
 +void pve_auth_setup(int vmid);
  void vnc_display_init(DisplayState *ds);
- void vnc_display_close(DisplayState *ds);
int vnc_display_open(DisplayState *ds, const char *display);
+ void vnc_display_open(DisplayState *ds, const char *display, Error **errp);
void vnc_display_add_client(DisplayState *ds, int csock, int skipauth);