]> git.proxmox.com Git - vncterm.git/commitdiff
libvncserver: refresh TLS patch
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Thu, 2 Feb 2017 10:50:14 +0000 (11:50 +0100)
committerFabian Grünbichler <f.gruenbichler@proxmox.com>
Fri, 3 Feb 2017 07:50:43 +0000 (08:50 +0100)
vncpatches/tls-auth-pluging.patch

index 821ffe1622940e87733ffcdf2b1c8a628d1a16b5..17a8c47b2e5aa5f986214fe0b0dd72c844a78ae7 100644 (file)
@@ -1,14 +1,14 @@
 Index: vnc/libvncserver/auth.c
 ===================================================================
-@@ -270,8 +270,9 @@
+@@ -300,8 +300,9 @@
      int32_t securityType = rfbSecTypeInvalid;
  
      if (!cl->screen->authPasswdData || cl->reverseConnection) {
 -      /* chk if this condition is valid or not. */
 -      securityType = rfbSecTypeNone;
-+          /* chk if this condition is valid or not. */
-+          /* we disable anonymous auth */
-+          // securityType = rfbSecTypeNone;
++      /* chk if this condition is valid or not. */
++      /* we disable anonymous auth */
++      // securityType = rfbSecTypeNone;
      } else if (cl->screen->authPasswdData) {
            securityType = rfbSecTypeVncAuth;
      }
@@ -17,29 +17,28 @@ Index: vnc/libvncserver/sockets.c
 ===================================================================
 --- vnc.orig/libvncserver/sockets.c    2011-01-20 16:42:41.000000000 +0100
 +++ vnc/libvncserver/sockets.c 2011-01-21 10:20:03.000000000 +0100
-@@ -454,8 +454,12 @@
-     fd_set fds;
-     struct timeval tv;
-+
-     while (len > 0) {
+@@ -613,7 +613,11 @@ rfbReadExactTimeout(rfbClientPtr cl, char* buf, int len, int timeout)
+             n = read(sock, buf, len);
+         }
+ #else
 -        n = read(sock, buf, len);
-+          if (cl->sock_read_fn)
-+                  n = cl->sock_read_fn(cl, buf, len);
-+          else
-+                  n = read(sock, buf, len);
++      if (cl->sock_read_fn) {
++          n = cl->sock_read_fn(cl, buf, len);
++      } else {
++          n = read(sock, buf, len);
++      }
+ #endif
  
          if (n > 0) {
-@@ -538,7 +542,10 @@
-     LOCK(cl->outputMutex);
-     while (len > 0) {
--        n = write(sock, buf, len);
-+      if (cl->sock_write_fn)
+@@ -801,7 +805,11 @@ rfbWriteExact(rfbClientPtr cl,
+           n = rfbssl_write(cl, buf, len);
+       else
+ #endif
++      if (cl->sock_write_fn) {
 +          n = cl->sock_write_fn(cl, buf, len);
-+      else
-+          n = write(sock, buf, len);
++      } else {
+           n = write(sock, buf, len);
++      }
  
          if (n > 0) {