diff options
author | dscho <dscho> | 2003-07-28 00:57:52 +0000 |
---|---|---|
committer | dscho <dscho> | 2003-07-28 00:57:52 +0000 |
commit | 9f0a1a3bc16d26420c703c6e6cc0f18bd4f6b81e (patch) | |
tree | 0aa185de6ff17df411ce24001954435a524a970e /main.c | |
parent | b9ebdab1f255316ccb9160daa0976d57adfe2675 (diff) | |
download | libtdevnc-9f0a1a3bc16d26420c703c6e6cc0f18bd4f6b81e.tar.gz libtdevnc-9f0a1a3bc16d26420c703c6e6cc0f18bd4f6b81e.zip |
synced with TightVNC and RealVNC
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -467,12 +467,16 @@ Bool defaultPasswordCheck(rfbClientPtr cl,const char* response,int len) Bool rfbCheckPasswordByList(rfbClientPtr cl,const char* response,int len) { char **passwds; + int i=0; - for(passwds=(char**)cl->screen->rfbAuthPasswdData;*passwds;passwds++) { + for(passwds=(char**)cl->screen->rfbAuthPasswdData;*passwds;passwds++,i++) { vncEncryptBytes(cl->authChallenge, *passwds); - if (memcmp(cl->authChallenge, response, len) == 0) + if (memcmp(cl->authChallenge, response, len) == 0) { + if(i>=cl->screen->rfbAuthPasswdFirstViewOnly) + cl->viewOnly=TRUE; return(TRUE); + } } rfbLog("rfbAuthProcessClientMessage: authentication failed from %s\n", @@ -574,6 +578,7 @@ rfbScreenInfoPtr rfbGetScreen(int* argc,char** argv, rfbScreen->rfbNeverShared = FALSE; rfbScreen->rfbDontDisconnect = FALSE; rfbScreen->rfbAuthPasswdData = 0; + rfbScreen->rfbAuthPasswdFirstViewOnly = 1; rfbScreen->width = width; rfbScreen->height = height; @@ -611,6 +616,7 @@ rfbScreenInfoPtr rfbGetScreen(int* argc,char** argv, IF_PTHREADS(rfbScreen->backgroundLoop = FALSE); rfbScreen->rfbDeferUpdateTime=5; + rfbScreen->maxRectsPerUpdate=50; /* proc's and hook's */ |