From 67094d7c281993497decb1459ea1663765a760eb Mon Sep 17 00:00:00 2001 From: dscho Date: Thu, 11 Oct 2001 15:44:58 +0000 Subject: replaced xalloc with malloc functions, udp input support (untested), fixed http --- main.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'main.c') diff --git a/main.c b/main.c index 478d8d8..7191a9f 100644 --- a/main.c +++ b/main.c @@ -326,7 +326,7 @@ processArguments(rfbScreenInfoPtr rfbScreen,int argc, char *argv[]) rfbScreen->rfbMaxClientWait = atoi(argv[++i]); } else if (strcmp(argv[i], "-rfbauth") == 0) { /* -rfbauth passwd-file */ if (i + 1 >= argc) usage(); - rfbScreen->rfbAuthPasswdFile = argv[++i]; + rfbScreen->rfbAuthPasswdData = argv[++i]; } else if (strcmp(argv[i], "-desktop") == 0) { /* -desktop desktop-name */ if (i + 1 >= argc) usage(); rfbScreen->desktopName = argv[++i]; @@ -400,6 +400,15 @@ rfbCursorPtr defaultGetCursorPtr(rfbClientPtr cl) return(cl->screen->cursor); } +Bool defaultGetPassword(rfbClientPtr cl,char* passwd,int len) +{ + char *pwd=vncDecryptPasswdFromFile(cl->screen->rfbAuthPasswdData); + if(!pwd) + return(FALSE); + strncpy(passwd,pwd,MAXPWLEN); + return(TRUE); +} + void doNothingWithClient(rfbClientPtr cl) { } @@ -511,6 +520,7 @@ rfbScreenInfoPtr rfbGetScreen(int argc,char** argv, rfbScreen->setXCutText = defaultSetXCutText; rfbScreen->getCursorPtr = defaultGetCursorPtr; rfbScreen->setTranslateFunction = rfbSetTranslateFunction; + rfbScreen->getPassword = defaultGetPassword; rfbScreen->newClientHook = doNothingWithClient; rfbScreen->displayHook = 0; -- cgit v1.2.1