diff options
author | dscho <dscho> | 2001-10-13 15:14:27 +0000 |
---|---|---|
committer | dscho <dscho> | 2001-10-13 15:14:27 +0000 |
commit | 9f07e222f828b7b2bf2775b9dc8cd18b22a829c1 (patch) | |
tree | 96d8ade36b70799217d3cfd9fb89193c2c1be7a0 /auth.c | |
parent | ac263ce9aa1561847427b71298861594d8623e61 (diff) | |
download | libtdevnc-9f07e222f828b7b2bf2775b9dc8cd18b22a829c1.tar.gz libtdevnc-9f07e222f828b7b2bf2775b9dc8cd18b22a829c1.zip |
rfbSelectBox, consoleFonts, too many changes
Diffstat (limited to 'auth.c')
-rw-r--r-- | auth.c | 29 |
1 files changed, 3 insertions, 26 deletions
@@ -73,8 +73,7 @@ void rfbAuthProcessClientMessage(cl) rfbClientPtr cl; { - char passwd[1024]; - int i, n; + int n; CARD8 response[CHALLENGESIZE]; CARD32 authResult; @@ -85,8 +84,8 @@ rfbAuthProcessClientMessage(cl) return; } - if(!cl->screen->getPassword(cl,passwd,MAXPWLEN)) { - rfbLog("rfbAuthProcessClientMessage: could not get password\n"); + if(!cl->screen->passwordCheck(cl,response,CHALLENGESIZE)) { + rfbLog("rfbAuthProcessClientMessage: password check failed\n"); authResult = Swap32IfLE(rfbVncAuthFailed); if (WriteExact(cl, (char *)&authResult, 4) < 0) { rfbLogPerror("rfbAuthProcessClientMessage: write"); @@ -95,28 +94,6 @@ rfbAuthProcessClientMessage(cl) return; } - vncEncryptBytes(cl->authChallenge, passwd); - - /* Lose the password from memory */ - for (i = strlen(passwd); i >= 0; i--) { - passwd[i] = '\0'; - } - - free((char *)passwd); - - if (memcmp(cl->authChallenge, response, CHALLENGESIZE) != 0) { - rfbLog("rfbAuthProcessClientMessage: authentication failed from %s\n", - cl->host); - - authResult = Swap32IfLE(rfbVncAuthFailed); - - if (WriteExact(cl, (char *)&authResult, 4) < 0) { - rfbLogPerror("rfbAuthProcessClientMessage: write"); - } - rfbCloseClient(cl); - return; - } - authResult = Swap32IfLE(rfbVncAuthOK); if (WriteExact(cl, (char *)&authResult, 4) < 0) { |