From 9f07e222f828b7b2bf2775b9dc8cd18b22a829c1 Mon Sep 17 00:00:00 2001 From: dscho Date: Sat, 13 Oct 2001 15:14:27 +0000 Subject: rfbSelectBox, consoleFonts, too many changes --- auth.c | 29 +++-------------------------- 1 file changed, 3 insertions(+), 26 deletions(-) (limited to 'auth.c') diff --git a/auth.c b/auth.c index 4244cd6..e7bd74f 100644 --- a/auth.c +++ b/auth.c @@ -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) { -- cgit v1.2.3