Hacks to get telnetd to work in XP and Wine
authorSteven Edwards <winehacker@gmail.com>
Wed, 4 Feb 2009 06:35:57 +0000 (06:35 +0000)
committerSteven Edwards <winehacker@gmail.com>
Wed, 4 Feb 2009 06:35:57 +0000 (06:35 +0000)
 - turn off unicode in rbuild file and serviceentry.c
   Its not unicode yet anyway

 - Disable authentication stuff

svn path=/trunk/; revision=39380

rosapps/applications/sysutils/telnetd/serviceentry.c
rosapps/applications/sysutils/telnetd/telnetd.c
rosapps/applications/sysutils/telnetd/telnetd.rbuild

index 5abf724..3ecfd8e 100644 (file)
@@ -57,8 +57,9 @@ ServiceMain(DWORD argc, LPTSTR *argv)
 
 
 int
-wmain(int argc, WCHAR *argv[])
+main(int argc, CHAR *argv[])
 {
+#if 0
     SERVICE_TABLE_ENTRY ServiceTable[2] =
     {
         {SERVICE_NAME, ServiceMain},
@@ -71,6 +72,7 @@ wmain(int argc, WCHAR *argv[])
     DPRINT("TelnetD: main() started\n");
 
     StartServiceCtrlDispatcher(ServiceTable);
+#endif
 
        telnetd_main();
 
index 65dee3e..0aa105e 100644 (file)
@@ -262,6 +262,8 @@ static DWORD WINAPI UserLoginThread(LPVOID data)
     return 0;
   }
   received = ReceiveLine(client->socket, password, sizeof(password), Password );
+
+#if 0
   if (received < 0) {
     closesocket(client->socket);
     free(client);
@@ -271,18 +273,20 @@ static DWORD WINAPI UserLoginThread(LPVOID data)
       *terminator = '\0';
     }
   }
-
+#endif
 
   /* TODO: do authentication here */
 
   
   printf("User '%s' logged on\n", userID);
+#if 0
   strcpy(client->userID, userID);
   if (send(client->socket, logonPrompt, strlen(logonPrompt), 0) < 0) {   
     closesocket(client->socket);
     free(client);
     return 0;
   }
+#endif
   RunShell(client);
   return 0;
 }
index 3be3e93..3f6325a 100644 (file)
@@ -1,4 +1,4 @@
-<module name="telnetd" type="win32cui" installbase="system32" installname="telnetd.exe" allowwarnings="true" unicode="yes">
+<module name="telnetd" type="win32cui" installbase="system32" installname="telnetd.exe" allowwarnings="true" unicode="no">
        <include base="reactos"></include>
        <include base="telnetd">..</include>