[pve-devel] r5401 - pve-qemu-kvm/pve2/debian/patches
svn-commits at proxmox.com
svn-commits at proxmox.com
Wed Jan 19 15:16:13 CET 2011
Author: dietmar
Date: 2011-01-19 15:16:13 +0100 (Wed, 19 Jan 2011)
New Revision: 5401
Modified:
pve-qemu-kvm/pve2/debian/patches/pve-auth.patch
Log:
cleanups
Modified: pve-qemu-kvm/pve2/debian/patches/pve-auth.patch
===================================================================
--- pve-qemu-kvm/pve2/debian/patches/pve-auth.patch 2011-01-19 13:55:44 UTC (rev 5400)
+++ pve-qemu-kvm/pve2/debian/patches/pve-auth.patch 2011-01-19 14:16:13 UTC (rev 5401)
@@ -1,7 +1,7 @@
Index: new/ui/vnc.c
===================================================================
---- new.orig/ui/vnc.c 2011-01-19 08:04:34.000000000 +0100
-+++ new/ui/vnc.c 2011-01-19 11:31:55.000000000 +0100
+--- new.orig/ui/vnc.c 2011-01-19 11:52:01.000000000 +0100
++++ new/ui/vnc.c 2011-01-19 15:13:13.000000000 +0100
@@ -31,6 +31,8 @@
#include "qemu-timer.h"
#include "acl.h"
@@ -11,7 +11,7 @@
#define VNC_REFRESH_INTERVAL_BASE 30
#define VNC_REFRESH_INTERVAL_INC 50
-@@ -46,6 +48,71 @@
+@@ -46,6 +48,73 @@
} \
}
@@ -33,8 +33,10 @@
+ char **penv;
+
+ char vmidstr[32];
++ char pwenv[1024];
+
+ sprintf(vmidstr, "%d", pve_vmid);
++ sprintf(pwenv, "PVE_PW_TICKET=%s", passwd);
+
+ const char *script ="/usr/bin/pve-authhelper";
+
@@ -60,7 +62,7 @@
+ *parg++ = (char *)username;
+ *parg = NULL;
+ penv = env;
-+ *penv++ = (char *)passwd;
++ *penv++ = (char *)pwenv;
+ *penv = NULL;
+ execve(script, args, env);
+ _exit(1);
@@ -83,7 +85,16 @@
static VncDisplay *vnc_display; /* needed for info vnc */
static DisplayChangeListener *dcl;
-@@ -2669,7 +2735,7 @@
+@@ -2545,7 +2614,7 @@
+ char *vnc_display_local_addr(DisplayState *ds)
+ {
+ VncDisplay *vs = ds ? (VncDisplay *)ds->opaque : vnc_display;
+-
++
+ return vnc_socket_local_addr("%s:%s", vs->lsock);
+ }
+
+@@ -2669,7 +2738,7 @@
vs->subauth = VNC_AUTH_VENCRYPT_X509VNC;
} else {
VNC_DEBUG("Initializing VNC server with TLS password auth\n");
@@ -94,9 +105,9 @@
#endif /* CONFIG_VNC_TLS */
Index: new/ui/vnc-auth-vencrypt.c
===================================================================
---- new.orig/ui/vnc-auth-vencrypt.c 2011-01-19 08:14:58.000000000 +0100
-+++ new/ui/vnc-auth-vencrypt.c 2011-01-19 11:35:18.000000000 +0100
-@@ -26,6 +26,88 @@
+--- new.orig/ui/vnc-auth-vencrypt.c 2011-01-19 11:49:17.000000000 +0100
++++ new/ui/vnc-auth-vencrypt.c 2011-01-19 15:12:12.000000000 +0100
+@@ -26,6 +26,96 @@
#include "vnc.h"
@@ -152,14 +163,22 @@
+
+ VNC_DEBUG("AUTH PLAIN START %u %u\n", ulen, pwlen);
+
-+ if (!ulen || ulen >= 255) {
-+ err = "User name too long.";
-+ goto err;
++ if (!ulen) {
++ err = "No User name.";
++ goto err;
+ }
-+ if (!pwlen || pwlen >= 511) {
-+ err = "Password too long.";
-+ goto err;
++ if (ulen >= 255) {
++ err = "User name too long.";
++ goto err;
+ }
++ if (!pwlen) {
++ err = "Password too short";
++ goto err;
++ }
++ if (pwlen >= 511) {
++ err = "Password too long.";
++ goto err;
++ }
+
+ vs->username_len = ulen;
+ vs->password_len = pwlen;
@@ -185,7 +204,7 @@
static void start_auth_vencrypt_subauth(VncState *vs)
{
-@@ -37,6 +119,11 @@
+@@ -37,6 +127,11 @@
start_client_init(vs);
break;
@@ -199,8 +218,8 @@
VNC_DEBUG("Start TLS auth VNC\n");
Index: new/ui/vnc.h
===================================================================
---- new.orig/ui/vnc.h 2011-01-19 09:35:54.000000000 +0100
-+++ new/ui/vnc.h 2011-01-19 11:33:16.000000000 +0100
+--- new.orig/ui/vnc.h 2011-01-19 11:52:01.000000000 +0100
++++ new/ui/vnc.h 2011-01-19 11:52:01.000000000 +0100
@@ -217,6 +217,8 @@
char challenge[VNC_AUTH_CHALLENGE_SIZE];
More information about the pve-devel
mailing list