This doesn't work right. If the server security type order is being honored, then it should be the case that if I set the server order to "VncAuth,TLSVnc", the client should use VncAuth by default as long as VncAuth is in the client's list of security types. That is not what is happening. TLSVnc is still being used as the default.
On 2/21/11 6:55 AM, at...@users.sourceforge.net wrote: > Revision: 4300 > http://tigervnc.svn.sourceforge.net/tigervnc/?rev=4300&view=rev > Author: atkac > Date: 2011-02-21 12:55:24 +0000 (Mon, 21 Feb 2011) > > Log Message: > ----------- > [Bugfix] Honor server security type order instead of client's when > negotiating security type. > > Modified Paths: > -------------- > trunk/common/rfb/CConnection.cxx > > Modified: trunk/common/rfb/CConnection.cxx > =================================================================== > --- trunk/common/rfb/CConnection.cxx 2011-02-21 12:40:30 UTC (rev 4299) > +++ trunk/common/rfb/CConnection.cxx 2011-02-21 12:55:24 UTC (rev 4300) > @@ -157,24 +157,23 @@ > throwConnFailedException(); > > std::list<rdr::U8>::iterator j; > - int secTypePos, secTypePosMin; > > - secTypePosMin = secTypes.size(); > - > for (int i = 0; i < nServerSecTypes; i++) { > rdr::U8 serverSecType = is->readU8(); > vlog.debug("Server offers security type %s(%d)", > - secTypeName(serverSecType),serverSecType); > + secTypeName(serverSecType), serverSecType); > > - // We keep trying types, to find the one that matches and > - // which appears first in the client's list of supported types. > - for (j = secTypes.begin(), secTypePos = 0; j != secTypes.end(); j++, > secTypePos++) { > - if (*j == serverSecType && secTypePos < secTypePosMin) { > - secType = *j; > - secTypePosMin = secTypePos; > - break; > - } > - } > + /* > + * Use the first type sent by server which matches client's type. > + * It means server's order specifies priority. > + */ > + if (secType == secTypeInvalid) { > + for (j = secTypes.begin(); j != secTypes.end(); j++) > + if (*j == serverSecType) { > + secType = *j; > + break; > + } > + } > } > > // Inform the server of our decision > > > This was sent by the SourceForge.net collaborative development platform, the > world's largest Open Source development site. > > ------------------------------------------------------------------------------ > The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: > Pinpoint memory and threading errors before they happen. > Find and fix more than 250 security defects in the development cycle. > Locate bottlenecks in serial and parallel code that limit performance. > http://p.sf.net/sfu/intel-dev2devfeb > _______________________________________________ > Tigervnc-commits mailing list > tigervnc-comm...@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/tigervnc-commits ------------------------------------------------------------------------------ The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: Pinpoint memory and threading errors before they happen. Find and fix more than 250 security defects in the development cycle. Locate bottlenecks in serial and parallel code that limit performance. http://p.sf.net/sfu/intel-dev2devfeb _______________________________________________ Tigervnc-devel mailing list Tigervnc-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tigervnc-devel