Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:rkwasny
vino
vino-196556-rfb38.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File vino-196556-rfb38.patch of Package vino
Index: server/libvncserver/auth.c =================================================================== RCS file: /cvs/gnome/vino/server/libvncserver/auth.c,v retrieving revision 1.5 diff -u -p -r1.5 auth.c --- server/libvncserver/auth.c 1 Sep 2004 10:46:10 -0000 1.5 +++ server/libvncserver/auth.c 14 Sep 2006 20:09:11 -0000 @@ -194,7 +194,7 @@ rfbAuthNewClient3_3(rfbClientPtr cl) void rfbAuthNewClient(rfbClientPtr cl) { - if (cl->minorVersion == rfbProtocolMinorVersion7) + if (cl->minorVersion >= rfbProtocolMinorVersion7) rfbAuthNewClient3_7(cl); else rfbAuthNewClient3_3(cl); @@ -281,9 +281,14 @@ rfbAuthProcessSecurityTypeMessage(rfbCli cl->state = RFB_AUTHENTICATION; break; case rfbNoAuth: - cl->state = RFB_INITIALISATION; - if (rfbAuthClientAuthenticated(cl)) - rfbProcessClientInitMessage(cl); + + if (cl->minorVersion >= rfbProtocolMinorVersion8) + rfbAuthPasswordChecked (cl, RFB_CLIENT_ACCEPT); + else { + cl->state = RFB_INITIALISATION; + if (rfbAuthClientAuthenticated(cl)) + rfbProcessClientInitMessage(cl); + } break; default: /* can't be reached */ @@ -421,6 +426,26 @@ rfbAuthPasswordChecked(rfbClientPtr rfbLogPerror("rfbAuthPasswordChecked: write"); rfbCloseClient(cl); return; + } + + if (cl->minorVersion >= rfbProtocolMinorVersion8) { + /* We can't really localize this string, since it has to + * be iso8859-1 encoded. However, the string will only be + * returned when we're using protocol version 3.8, and we + * only advertise support for 3.7, so this only gets used + * at all if you have a broken client. + */ + const char errmsg[] = "Password incorrect"; + uint32_t len, wireLen; + + len = sizeof(errmsg) - 1; + wireLen = Swap32IfLE(len); + if (WriteExact(cl, (char *)&wireLen, 4) < 0 || + WriteExact(cl, errmsg, len) < 0) { + rfbLogPerror("rfbAuthPasswordChecked: write"); + rfbCloseClient(cl); + return; + } } rfbCloseClient(cl); Index: server/libvncserver/rfbserver.c =================================================================== RCS file: /cvs/gnome/vino/server/libvncserver/rfbserver.c,v retrieving revision 1.3 diff -u -p -r1.3 rfbserver.c --- server/libvncserver/rfbserver.c 12 Jul 2004 12:17:52 -0000 1.3 +++ server/libvncserver/rfbserver.c 14 Sep 2006 20:09:12 -0000 @@ -496,12 +496,16 @@ rfbProcessClientProtocolVersion(cl) return; } - if (minor_ != rfbProtocolMinorVersion3 && minor_ != rfbProtocolMinorVersion7) { + if (minor_ != rfbProtocolMinorVersion3 && + minor_ != rfbProtocolMinorVersion7 && + minor_ != rfbProtocolMinorVersion8) { /* Minor version mismatch - warn but try to continue */ rfbLog("Ignoring minor version mismatch\n"); } - if (minor_ >= rfbProtocolMinorVersion7) + if (minor_ >= rfbProtocolMinorVersion8) + cl->minorVersion = rfbProtocolMinorVersion8; + else if (minor_ == rfbProtocolMinorVersion7) cl->minorVersion = rfbProtocolMinorVersion7; else cl->minorVersion = rfbProtocolMinorVersion3; Index: server/libvncserver/rfb/rfbproto.h =================================================================== RCS file: /cvs/gnome/vino/server/libvncserver/rfb/rfbproto.h,v retrieving revision 1.3 diff -u -p -r1.3 rfbproto.h --- server/libvncserver/rfb/rfbproto.h 12 Jul 2004 12:17:52 -0000 1.3 +++ server/libvncserver/rfb/rfbproto.h 14 Sep 2006 20:09:12 -0000 @@ -212,6 +212,7 @@ typedef struct { #define rfbProtocolMajorVersion 3 #define rfbProtocolMinorVersion3 3 #define rfbProtocolMinorVersion7 7 +#define rfbProtocolMinorVersion8 8 typedef char rfbProtocolVersionMsg[13]; /* allow extra byte for null */
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor