ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
February 2009
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
29 participants
559 discussions
Start a n
N
ew thread
[sedwards] 39429: - Use the Wine spooler service as the service entry template as I was testing on Wine. (Disabled to allow stand alone build while we wait on AFD fix) - Move some stuff around to the header to prepare for later cleanups
by sedwards@svn.reactos.org
Author: sedwards Date: Fri Feb 6 00:45:54 2009 New Revision: 39429 URL:
http://svn.reactos.org/svn/reactos?rev=39429&view=rev
Log: - Use the Wine spooler service as the service entry template as I was testing on Wine. (Disabled to allow stand alone build while we wait on AFD fix) - Move some stuff around to the header to prepare for later cleanups Modified: trunk/rosapps/applications/sysutils/telnetd/serviceentry.c trunk/rosapps/applications/sysutils/telnetd/telnetd.c trunk/rosapps/applications/sysutils/telnetd/telnetd.h Modified: trunk/rosapps/applications/sysutils/telnetd/serviceentry.c URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/sysutils/teln…
============================================================================== --- trunk/rosapps/applications/sysutils/telnetd/serviceentry.c [iso-8859-1] (original) +++ trunk/rosapps/applications/sysutils/telnetd/serviceentry.c [iso-8859-1] Fri Feb 6 00:45:54 2009 @@ -1,86 +1,111 @@ /* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * FILE: services/TelnetD/TelnetD.c - * PURPOSE: Printer spooler - * PROGRAMMER: Eric Kohl + * Copyright 2007 Jacek Caban for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#if 0 +#define WIN32_LEAN_AND_MEAN -/* INCLUDES *****************************************************************/ +#include <windows.h> -#include "telnetd.h" -#define DPRINT printf +#define WINE_FIXME printf +#define WINE_TRACE printf -/* GLOBALS ******************************************************************/ +//#include "wine/debug.h" -#define SERVICE_NAME TEXT("TelnetD") +//WINE_DEFAULT_DEBUG_CHANNEL(spoolsv); -SERVICE_STATUS_HANDLE ServiceStatusHandle; +static WCHAR telnetdW[] = {'T','e','l','n','e','t','D',0}; +static SERVICE_STATUS_HANDLE service_handle; +static HANDLE stop_event; -/* FUNCTIONS *****************************************************************/ +static DWORD WINAPI service_handler( DWORD ctrl, DWORD event_type, LPVOID event_data, LPVOID context ) +{ + SERVICE_STATUS status; -#if 0 -static DWORD WINAPI -ServiceControlHandler(DWORD dwControl, - DWORD dwEventType, - LPVOID lpEventData, - LPVOID lpContext) -{ - switch (dwControl) + status.dwServiceType = SERVICE_WIN32; + status.dwControlsAccepted = SERVICE_ACCEPT_STOP; + status.dwWin32ExitCode = 0; + status.dwServiceSpecificExitCode = 0; + status.dwCheckPoint = 0; + status.dwWaitHint = 0; + + switch(ctrl) { - case SERVICE_CONTROL_STOP: - case SERVICE_CONTROL_SHUTDOWN: - return ERROR_SUCCESS; - - default : - return ERROR_CALL_NOT_IMPLEMENTED; + case SERVICE_CONTROL_STOP: + case SERVICE_CONTROL_SHUTDOWN: + WINE_TRACE( "shutting down\n" ); + status.dwCurrentState = SERVICE_STOP_PENDING; + status.dwControlsAccepted = 0; + SetServiceStatus( service_handle, &status ); + SetEvent( stop_event ); + return NO_ERROR; + default: + WINE_FIXME( "got service ctrl %x\n", ctrl ); + status.dwCurrentState = SERVICE_RUNNING; + SetServiceStatus( service_handle, &status ); + return NO_ERROR; } } +static void WINAPI serv_main(DWORD argc, LPWSTR *argv) +{ + SERVICE_STATUS status; + int retval; + WINE_TRACE( "starting service\n" ); -static VOID CALLBACK -ServiceMain(DWORD argc, LPTSTR *argv) + stop_event = CreateEventW( NULL, TRUE, FALSE, NULL ); + + service_handle = RegisterServiceCtrlHandlerExW( telnetdW, service_handler, NULL ); + if (!service_handle) + return; + + status.dwServiceType = SERVICE_WIN32; + status.dwCurrentState = SERVICE_RUNNING; + status.dwControlsAccepted = SERVICE_ACCEPT_STOP | SERVICE_ACCEPT_SHUTDOWN; + status.dwWin32ExitCode = 0; + status.dwServiceSpecificExitCode = 0; + status.dwCheckPoint = 0; + status.dwWaitHint = 10000; + SetServiceStatus( service_handle, &status ); + + /* Argument Ignored for now */ + retval = kickoff_telnetd(); + + WaitForSingleObject( stop_event, INFINITE ); + + status.dwCurrentState = SERVICE_STOPPED; + status.dwControlsAccepted = 0; + SetServiceStatus( service_handle, &status ); + WINE_TRACE( "service stopped\n" ); +} + +int main(int argc, char **argv) { - UNREFERENCED_PARAMETER(argc); - UNREFERENCED_PARAMETER(argv); - - DPRINT("ServiceMain() called\n"); - - ServiceStatusHandle = RegisterServiceCtrlHandlerExW(SERVICE_NAME, - ServiceControlHandler, - NULL); - - DPRINT("ServiceMain() done\n"); -} -#endif - -int -main(int argc, CHAR *argv[]) -{ -#if 0 - SERVICE_TABLE_ENTRY ServiceTable[2] = - { - {SERVICE_NAME, ServiceMain}, + static const SERVICE_TABLE_ENTRYW servtbl[] = { + {telnetdW, serv_main}, {NULL, NULL} }; - UNREFERENCED_PARAMETER(argc); - UNREFERENCED_PARAMETER(argv); + WINE_TRACE("(%d %p)\n", argc, argv); - DPRINT("TelnetD: main() started\n"); - - StartServiceCtrlDispatcher(ServiceTable); -#endif - telnetd_main(); - - DPRINT("TelnetD: main() done\n"); - - ExitThread(0); - + StartServiceCtrlDispatcherW(servtbl); return 0; } - +#endif /* EOF */ Modified: trunk/rosapps/applications/sysutils/telnetd/telnetd.c URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/sysutils/teln…
============================================================================== --- trunk/rosapps/applications/sysutils/telnetd/telnetd.c [iso-8859-1] (original) +++ trunk/rosapps/applications/sysutils/telnetd/telnetd.c [iso-8859-1] Fri Feb 6 00:45:54 2009 @@ -1,6 +1,4 @@ /* - * File: TelnetD.c - * * Abstract: a simple telnet 'daemon' for Windows hosts. * * Compiled & run successfully using MSVC 5.0 under Windows95 (requires @@ -16,100 +14,30 @@ * TODO: * - access control * - will/won't handshake - * - (run as) Windows NT service + * - Unify Debugging output and return StatusCodes */ #include <stdio.h> -#include <windows.h> - -/* -** macro definitions -*/ -#define TELNET_PORT (23) - -#define BUFSIZE (4096) -#define USERID_SIZE (64) -#define CTRLC (3) -#define BS (8) -#define CR (13) -#define LF (10) -#define DEL (127) - -#define IAC "\xff" -#define DONT "\xfe" -#define WONT "\xfc" -#define WILL "\xfb" -#define DO "\xfd" -#define SB "\xfa" -#define SE "\xf0" -#define ECHO "\x01" -#define SUPPRESS_GO_AHEAD "\x03" -#define TERMINAL_TYPE "\x18" -#define NAWS "\x1f" -#define LINEMODE "\x22" -#define NEWENVIRON "\x27" -#define MODE "\x01" - - -#define HANDSHAKE_TIMEOUT (3) - -/* -** types -*/ - -typedef struct client_s -{ - char userID[USERID_SIZE]; - int socket; - BOOLEAN bTerminate; - BOOLEAN bReadFromPipe; - BOOLEAN bWriteToPipe; - HANDLE hProcess; - DWORD dwProcessId; - HANDLE hChildStdinWr; - HANDLE hChildStdoutRd; -} client_t; - -typedef enum -{ - NoEcho = 0, - Echo = 1, - Password = 2 -} EchoMode; - -/* -** Local data -*/ +#include <windows.h> + +#include "telnetd.h" + +/* Local data */ static BOOLEAN bShutdown = 0; static BOOLEAN bSocketInterfaceInitialised = 0; static int sock; -/* -** Forward function declarations -*/ -static BOOL WINAPI Cleanup(DWORD dwControlType); -static void WaitForConnect(void); -static BOOLEAN StartSocketInterface(void); -static void CreateSocket(void); -static void UserLogin(int client_socket); -static DWORD WINAPI UserLoginThread(LPVOID); -static int DoTelnetHandshake(int sock); -static int ReceiveLine(int sock, char *buffer, int len, EchoMode echo); -static void RunShell(client_t *client); -//static BOOL CreateChildProcess(const char *); -static DWORD WINAPI MonitorChildThread(LPVOID); -static DWORD WINAPI WriteToPipeThread(LPVOID); -static DWORD WINAPI ReadFromPipeThread(LPVOID); -static void TerminateShell(client_t *client); -static VOID ErrorExit(LPTSTR); - - -/* -** main -*/ -DWORD telnetd_main() +/* In the future, some options might be passed here to handle + * authentication options in the registry or command line + * options passed to the service + * + * Once you are ready to turn on the service + * rename this function + * int kickoff_telnetd(void) + */ +int main(int argc, char **argv) { SetConsoleCtrlHandler(Cleanup, 1); @@ -127,9 +55,7 @@ return 0; } -/* -** Cleanup -*/ +/* Cleanup */ static BOOL WINAPI Cleanup(DWORD dwControlType) { if (bSocketInterfaceInitialised) { @@ -139,9 +65,7 @@ return 0; } -/* -** StartSocketInterface -*/ +/* StartSocketInterface */ static BOOLEAN StartSocketInterface(void) { WORD wVersionRequested; Modified: trunk/rosapps/applications/sysutils/telnetd/telnetd.h URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/sysutils/teln…
============================================================================== --- trunk/rosapps/applications/sysutils/telnetd/telnetd.h [iso-8859-1] (original) +++ trunk/rosapps/applications/sysutils/telnetd/telnetd.h [iso-8859-1] Fri Feb 6 00:45:54 2009 @@ -1,8 +1,87 @@ +#ifndef __TELNETD_H +#define __TELNETD_H + #define _CRT_SECURE_NO_WARNINGS +#define WIN32_NO_STATUS #include <stdio.h> #include <winsock2.h> #include <tchar.h> #include <time.h> -DWORD telnetd_main(); +/* +** macro definitions +*/ +#define TELNET_PORT (23003) + +#define BUFSIZE (4096) +#define USERID_SIZE (64) +#define CTRLC (3) +#define BS (8) +#define CR (13) +#define LF (10) +#define DEL (127) + +#define IAC "\xff" +#define DONT "\xfe" +#define WONT "\xfc" +#define WILL "\xfb" +#define DO "\xfd" +#define SB "\xfa" +#define SE "\xf0" +#define ECHO "\x01" +#define SUPPRESS_GO_AHEAD "\x03" +#define TERMINAL_TYPE "\x18" +#define NAWS "\x1f" +#define LINEMODE "\x22" +#define NEWENVIRON "\x27" +#define MODE "\x01" + +#define HANDSHAKE_TIMEOUT (3) + +/* +** types +*/ + +typedef struct client_s +{ + char userID[USERID_SIZE]; + int socket; + BOOLEAN bTerminate; + BOOLEAN bReadFromPipe; + BOOLEAN bWriteToPipe; + HANDLE hProcess; + DWORD dwProcessId; + HANDLE hChildStdinWr; + HANDLE hChildStdoutRd; +} client_t; + +typedef enum +{ + NoEcho = 0, + Echo = 1, + Password = 2 +} EchoMode; + +/* +** Forward function declarations +*/ +static BOOL WINAPI Cleanup(DWORD dwControlType); +static void WaitForConnect(void); +static BOOLEAN StartSocketInterface(void); +static void CreateSocket(void); +static void UserLogin(int client_socket); +static DWORD WINAPI UserLoginThread(LPVOID); +static int DoTelnetHandshake(int sock); +static int ReceiveLine(int sock, char *buffer, int len, EchoMode echo); +static void RunShell(client_t *client); +//static BOOL CreateChildProcess(const char *); +static DWORD WINAPI MonitorChildThread(LPVOID); +static DWORD WINAPI WriteToPipeThread(LPVOID); +static DWORD WINAPI ReadFromPipeThread(LPVOID); +static void TerminateShell(client_t *client); +static VOID ErrorExit(LPTSTR); +int kickoff_telnetd(void); + +#endif /* __TELNETD_H */ +
15 years, 10 months
1
0
0
0
[sedwards] 39428: - Make telnetd only slightly more RFC-compatible Thanks to Fedora Anaconda telnet code as an example. This allows us to actually get an echo back on the screen when we type commands.
by sedwards@svn.reactos.org
Author: sedwards Date: Thu Feb 5 23:34:39 2009 New Revision: 39428 URL:
http://svn.reactos.org/svn/reactos?rev=39428&view=rev
Log: - Make telnetd only slightly more RFC-compatible Thanks to Fedora Anaconda telnet code as an example. This allows us to actually get an echo back on the screen when we type commands. Modified: trunk/rosapps/applications/sysutils/telnetd/telnetd.c Modified: trunk/rosapps/applications/sysutils/telnetd/telnetd.c URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/sysutils/teln…
============================================================================== --- trunk/rosapps/applications/sysutils/telnetd/telnetd.c [iso-8859-1] (original) +++ trunk/rosapps/applications/sysutils/telnetd/telnetd.c [iso-8859-1] Thu Feb 5 23:34:39 2009 @@ -35,12 +35,21 @@ #define LF (10) #define DEL (127) -#define IAC (255) -#define DONT (254) -#define WONT (253) -#define DO (252) -#define WILL (251) -#define ECHO (1) +#define IAC "\xff" +#define DONT "\xfe" +#define WONT "\xfc" +#define WILL "\xfb" +#define DO "\xfd" +#define SB "\xfa" +#define SE "\xf0" +#define ECHO "\x01" +#define SUPPRESS_GO_AHEAD "\x03" +#define TERMINAL_TYPE "\x18" +#define NAWS "\x1f" +#define LINEMODE "\x22" +#define NEWENVIRON "\x27" +#define MODE "\x01" + #define HANDSHAKE_TIMEOUT (3) @@ -300,10 +309,23 @@ int received; fd_set set; struct timeval timeout = { HANDSHAKE_TIMEOUT, 0 }; - unsigned char will_echo[3] = { IAC, WILL, ECHO }; + + char will_echo[]= + IAC DONT ECHO + IAC WILL ECHO + IAC WILL NAWS + IAC WILL SUPPRESS_GO_AHEAD + IAC DO SUPPRESS_GO_AHEAD + IAC DONT NEWENVIRON + IAC WONT NEWENVIRON + IAC WONT LINEMODE + IAC DO NAWS + IAC SB TERMINAL_TYPE "\x01" IAC SE + ; + unsigned char client_reply[256]; - if (send(sock, (const char *) will_echo, sizeof(will_echo), 0) < 0) { + if (send(sock, will_echo, sizeof(will_echo), 0) < 0) { return -1; } @@ -682,3 +704,4 @@ } ExitProcess(0); } +
15 years, 10 months
1
0
0
0
[tkreuzer] 39427: winddk: Move mm definitions into arch specific area
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Thu Feb 5 20:03:57 2009 New Revision: 39427 URL:
http://svn.reactos.org/svn/reactos?rev=39427&view=rev
Log: winddk: Move mm definitions into arch specific area Modified: trunk/reactos/include/ddk/winddk.h Modified: trunk/reactos/include/ddk/winddk.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/winddk.h?rev=3…
============================================================================== --- trunk/reactos/include/ddk/winddk.h [iso-8859-1] (original) +++ trunk/reactos/include/ddk/winddk.h [iso-8859-1] Thu Feb 5 20:03:57 2009 @@ -5612,6 +5612,24 @@ #define KI_USER_SHARED_DATA 0xffdf0000 +#define PAGE_SIZE 0x1000 +#define PAGE_SHIFT 12L + +#define SharedUserData ((KUSER_SHARED_DATA * CONST) KI_USER_SHARED_DATA) + +extern NTKERNELAPI PVOID MmHighestUserAddress; +extern NTKERNELAPI PVOID MmSystemRangeStart; +extern NTKERNELAPI ULONG_PTR MmUserProbeAddress; + +#define MM_HIGHEST_USER_ADDRESS MmHighestUserAddress +#define MM_SYSTEM_RANGE_START MmSystemRangeStart +#define MM_USER_PROBE_ADDRESS MmUserProbeAddress +#define MM_LOWEST_USER_ADDRESS (PVOID)0x10000 +#define MM_LOWEST_SYSTEM_ADDRESS (PVOID)0xC0C00000 + +#define MM_KSEG0_BASE MM_SYSTEM_RANGE_START +#define MM_SYSTEM_SPACE_END 0xFFFFFFFF + #elif defined(__x86_64__) typedef struct DECLSPEC_ALIGN(16) _M128A { @@ -5767,6 +5785,13 @@ #define PDE_TOP 0xFFFFF6FB7FFFFFFFULL #define PTE_TOP 0xFFFFF6FFFFFFFFFFULL +extern NTKERNELAPI PVOID MmHighestUserAddress; +extern NTKERNELAPI PVOID MmSystemRangeStart; +extern NTKERNELAPI ULONG_PTR MmUserProbeAddress; + +#define MM_HIGHEST_USER_ADDRESS MmHighestUserAddress +#define MM_SYSTEM_RANGE_START MmSystemRangeStart +#define MM_USER_PROBE_ADDRESS MmUserProbeAddress #define MM_LOWEST_USER_ADDRESS (PVOID)0x10000 #define MM_LOWEST_SYSTEM_ADDRESS (PVOID)0xFFFF080000000000ULL #define KI_USER_SHARED_DATA 0xFFFFF78000000000ULL @@ -5967,25 +5992,6 @@ #else #error Unknown architecture #endif - -#define PAGE_SIZE 0x1000 -#define PAGE_SHIFT 12L - -#define SharedUserData ((KUSER_SHARED_DATA * CONST) KI_USER_SHARED_DATA) - -extern NTKERNELAPI PVOID MmHighestUserAddress; -extern NTKERNELAPI PVOID MmSystemRangeStart; -extern NTKERNELAPI ULONG_PTR MmUserProbeAddress; - -#define MM_HIGHEST_USER_ADDRESS MmHighestUserAddress -#define MM_SYSTEM_RANGE_START MmSystemRangeStart -#define MM_USER_PROBE_ADDRESS MmUserProbeAddress -#define MM_LOWEST_USER_ADDRESS (PVOID)0x10000 -#define MM_LOWEST_SYSTEM_ADDRESS (PVOID)0xC0C00000 - -#define MM_KSEG0_BASE MM_SYSTEM_RANGE_START -#define MM_SYSTEM_SPACE_END 0xFFFFFFFF - #define EFLAG_SIGN 0x8000 #define EFLAG_ZERO 0x4000
15 years, 10 months
1
0
0
0
[tkreuzer] 39426: winddk.h add amd64 CONTEXT
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Thu Feb 5 18:05:33 2009 New Revision: 39426 URL:
http://svn.reactos.org/svn/reactos?rev=39426&view=rev
Log: winddk.h add amd64 CONTEXT Modified: trunk/reactos/include/ddk/winddk.h Modified: trunk/reactos/include/ddk/winddk.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/winddk.h?rev=3…
============================================================================== --- trunk/reactos/include/ddk/winddk.h [iso-8859-1] (original) +++ trunk/reactos/include/ddk/winddk.h [iso-8859-1] Thu Feb 5 18:05:33 2009 @@ -5614,6 +5614,117 @@ #elif defined(__x86_64__) +typedef struct DECLSPEC_ALIGN(16) _M128A { + ULONGLONG Low; + LONGLONG High; +} M128A, *PM128A; + +typedef struct _XMM_SAVE_AREA32 { + USHORT ControlWord; + USHORT StatusWord; + UCHAR TagWord; + UCHAR Reserved1; + USHORT ErrorOpcode; + ULONG ErrorOffset; + USHORT ErrorSelector; + USHORT Reserved2; + ULONG DataOffset; + USHORT DataSelector; + USHORT Reserved3; + ULONG MxCsr; + ULONG MxCsr_Mask; + M128A FloatRegisters[8]; + M128A XmmRegisters[16]; + UCHAR Reserved4[96]; +} XMM_SAVE_AREA32, *PXMM_SAVE_AREA32; + +typedef struct DECLSPEC_ALIGN(16) _CONTEXT { + ULONG64 P1Home; + ULONG64 P2Home; + ULONG64 P3Home; + ULONG64 P4Home; + ULONG64 P5Home; + ULONG64 P6Home; + + /* Control flags */ + ULONG ContextFlags; + ULONG MxCsr; + + /* Segment */ + USHORT SegCs; + USHORT SegDs; + USHORT SegEs; + USHORT SegFs; + USHORT SegGs; + USHORT SegSs; + USHORT EFlags; + + /* Debug */ + ULONG64 Dr0; + ULONG64 Dr1; + ULONG64 Dr2; + ULONG64 Dr3; + ULONG64 Dr6; + ULONG64 Dr7; + + /* Integer */ + ULONG64 Rax; + ULONG64 Rcx; + ULONG64 Rdx; + ULONG64 Rbx; + ULONG64 Rsp; + ULONG64 Rbp; + ULONG64 Rsi; + ULONG64 Rdi; + ULONG64 R8; + ULONG64 R9; + ULONG64 R10; + ULONG64 R11; + ULONG64 R12; + ULONG64 R13; + ULONG64 R14; + ULONG64 R15; + + /* Counter */ + ULONG64 Rip; + + /* Floating point */ + union { + XMM_SAVE_AREA32 FltSave; + struct { + M128A Header[2]; + M128A Legacy[8]; + M128A Xmm0; + M128A Xmm1; + M128A Xmm2; + M128A Xmm3; + M128A Xmm4; + M128A Xmm5; + M128A Xmm6; + M128A Xmm7; + M128A Xmm8; + M128A Xmm9; + M128A Xmm10; + M128A Xmm11; + M128A Xmm12; + M128A Xmm13; + M128A Xmm14; + M128A Xmm15; + } DUMMYSTRUCTNAME; + } DUMMYUNIONNAME; + + /* Vector */ + M128A VectorRegister[26]; + ULONG64 VectorControl; + + /* Debug control */ + ULONG64 DebugControl; + ULONG64 LastBranchToRip; + ULONG64 LastBranchFromRip; + ULONG64 LastExceptionToRip; + ULONG64 LastExceptionFromRip; +} CONTEXT; + // // Used to contain PFNs and PFN counts //
15 years, 10 months
1
0
0
0
[tkreuzer] 39425: Merge 37493, 37494 from amd64 branch: Fix amd64 / ia64 default definition of RtlGetCallersAddress (Timo Kreuzer)
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Thu Feb 5 17:35:51 2009 New Revision: 39425 URL:
http://svn.reactos.org/svn/reactos?rev=39425&view=rev
Log: Merge 37493,37494 from amd64 branch: Fix amd64 / ia64 default definition of RtlGetCallersAddress (Timo Kreuzer) Modified: trunk/reactos/include/ddk/winddk.h trunk/reactos/ntoskrnl/include/precomp.h Modified: trunk/reactos/include/ddk/winddk.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/winddk.h?rev=3…
============================================================================== --- trunk/reactos/include/ddk/winddk.h [iso-8859-1] (original) +++ trunk/reactos/include/ddk/winddk.h [iso-8859-1] Thu Feb 5 17:35:51 2009 @@ -6777,12 +6777,18 @@ RtlFreeUnicodeString( IN PUNICODE_STRING UnicodeString); +#if (defined(_M_AMD64) || defined(_M_IA64)) && !defined(_REALLY_GET_CALLERS_CALLER_) +#define RtlGetCallersAddress(CallersAddress, CallersCaller) \ + *CallersAddress = (PVOID)_ReturnAddress(); \ + *CallersCaller = NULL; +#else NTSYSAPI VOID NTAPI RtlGetCallersAddress( OUT PVOID *CallersAddress, OUT PVOID *CallersCaller); +#endif NTSYSAPI NTSTATUS Modified: trunk/reactos/ntoskrnl/include/precomp.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/precomp.h…
============================================================================== --- trunk/reactos/ntoskrnl/include/precomp.h [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/include/precomp.h [iso-8859-1] Thu Feb 5 17:35:51 2009 @@ -13,6 +13,7 @@ #include <psdk/ntverp.h> /* DDK/IFS/NDK Headers */ +#define _REALLY_GET_CALLERS_CALLER #ifdef _MSC_VER #include <excpt.h> #include <ntdef.h>
15 years, 10 months
1
0
0
0
[janderwald] 39424: - Fix a potential buffer overflow in RChangeServiceConfigA - Make sure that returned buffers are zero terminated in RQueryServiceConfigA
by janderwald@svn.reactos.org
Author: janderwald Date: Thu Feb 5 16:23:43 2009 New Revision: 39424 URL:
http://svn.reactos.org/svn/reactos?rev=39424&view=rev
Log: - Fix a potential buffer overflow in RChangeServiceConfigA - Make sure that returned buffers are zero terminated in RQueryServiceConfigA Modified: trunk/reactos/base/system/services/rpcserver.c Modified: trunk/reactos/base/system/services/rpcserver.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/services/rpcse…
============================================================================== --- trunk/reactos/base/system/services/rpcserver.c [iso-8859-1] (original) +++ trunk/reactos/base/system/services/rpcserver.c [iso-8859-1] Thu Feb 5 16:23:43 2009 @@ -2984,7 +2984,7 @@ lpDisplayName, -1, lpDisplayNameW, - wcslen(lpDisplayNameW) + 1); + strlen(lpDisplayName) + 1); RegSetValueExW(hServiceKey, L"DisplayName", @@ -3620,7 +3620,7 @@ lpImagePath, -1, lpStr, - wcslen(lpImagePath), + wcslen(lpImagePath)+1, 0, 0); } @@ -3639,7 +3639,7 @@ lpService->lpGroup->lpGroupName, -1, lpStr, - wcslen(lpService->lpGroup->lpGroupName), + wcslen(lpService->lpGroup->lpGroupName)+1, 0, 0); } @@ -3664,7 +3664,7 @@ lpServiceStartName, -1, lpStr, - wcslen(lpServiceStartName), + wcslen(lpServiceStartName)+1, 0, 0); } @@ -3683,7 +3683,7 @@ lpService->lpDisplayName, -1, lpStr, - wcslen(lpService->lpDisplayName), + wcslen(lpService->lpDisplayName)+1, 0, 0); }
15 years, 10 months
1
0
0
0
[mkupfer] 39423: - Add Denmark to country list and set geo id. - Set geo id for Czech Republic.
by mkupfer@svn.reactos.org
Author: mkupfer Date: Thu Feb 5 15:57:04 2009 New Revision: 39423 URL:
http://svn.reactos.org/svn/reactos?rev=39423&view=rev
Log: - Add Denmark to country list and set geo id. - Set geo id for Czech Republic. Modified: trunk/reactos/base/setup/usetup/muilanguages.h trunk/reactos/boot/bootdata/hivesft_arm.inf trunk/reactos/boot/bootdata/hivesft_i386.inf Modified: trunk/reactos/base/setup/usetup/muilanguages.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/muilangu…
============================================================================== --- trunk/reactos/base/setup/usetup/muilanguages.h [iso-8859-1] (original) +++ trunk/reactos/base/setup/usetup/muilanguages.h [iso-8859-1] Thu Feb 5 15:57:04 2009 @@ -168,8 +168,8 @@ {L"00001004", L"936", L"936", L"10008", L"Chinese (Singapore)", L"1", enUSPages, enUSErrorEntries, enUSStrings, UnicodeFonts, zhSGLayouts }, {L"00001404", L"950", L"950", L"10002", L"Chinese (Macau S.A.R.)", L"1", enUSPages, enUSErrorEntries, enUSStrings, UnicodeFonts, zhMOLayouts }, {L"0000041A", L"1250", L"852", L"10029", L"Croatian", L"385", enUSPages, enUSErrorEntries, enUSStrings, LatinFonts, hrHRLayouts }, - {L"00000405", L"1250", L"852", L"10029", L"Czech", L"1", csCZPages, csCZErrorEntries, csCZStrings, LatinFonts, csCZLayouts }, - {L"00000406", L"1252", L"850", L"10000", L"Danish", L"1", enUSPages, enUSErrorEntries, enUSStrings, LatinFonts, daDKLayouts }, + {L"00000405", L"1250", L"852", L"10029", L"Czech", L"420", csCZPages, csCZErrorEntries, csCZStrings, LatinFonts, csCZLayouts }, + {L"00000406", L"1252", L"850", L"10000", L"Danish", L"45", enUSPages, enUSErrorEntries, enUSStrings, LatinFonts, daDKLayouts }, {L"00000465", L"0", L"1", L"2", L"Divehi (Maldives)", L"960", enUSPages, enUSErrorEntries, enUSStrings, UnicodeFonts, dvMVLayouts }, {L"00000413", L"1252", L"850", L"10000", L"Dutch (Netherlands)", L"31", enUSPages, enUSErrorEntries, enUSStrings, LatinFonts, nlNLLayouts }, {L"00000813", L"1252", L"850", L"10000", L"Dutch (Belgium)", L"32", enUSPages, enUSErrorEntries, enUSStrings, LatinFonts, nlBELayouts }, Modified: trunk/reactos/boot/bootdata/hivesft_arm.inf URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/hivesft_arm.…
============================================================================== --- trunk/reactos/boot/bootdata/hivesft_arm.inf [iso-8859-1] (original) +++ trunk/reactos/boot/bootdata/hivesft_arm.inf [iso-8859-1] Thu Feb 5 15:57:04 2009 @@ -968,6 +968,8 @@ HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\43","Name",0x00000000,"Austria" HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\44","CountryCode",0x00010001,0x0000002c HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\44","Name",0x00000000,"United Kingdom" +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\45","CountryCode",0x00010001,0x0000002D +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\45","Name",0x00000000,"Denmark" HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\46","CountryCode",0x00010001,0x0000002e HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\46","Name",0x00000000,"Sweden" HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\47","CountryCode",0x00010001,0x0000002f Modified: trunk/reactos/boot/bootdata/hivesft_i386.inf URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/hivesft_i386…
============================================================================== --- trunk/reactos/boot/bootdata/hivesft_i386.inf [iso-8859-1] (original) +++ trunk/reactos/boot/bootdata/hivesft_i386.inf [iso-8859-1] Thu Feb 5 15:57:04 2009 @@ -974,6 +974,8 @@ HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\43","Name",0x00000000,"Austria" HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\44","CountryCode",0x00010001,0x0000002c HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\44","Name",0x00000000,"United Kingdom" +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\45","CountryCode",0x00010001,0x0000002D +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\45","Name",0x00000000,"Denmark" HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\46","CountryCode",0x00010001,0x0000002e HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\46","Name",0x00000000,"Sweden" HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\47","CountryCode",0x00010001,0x0000002f
15 years, 10 months
1
0
0
0
[janderwald] 39421: - Ignore lpResult parameter
by janderwald@svn.reactos.org
Author: janderwald Date: Thu Feb 5 14:19:32 2009 New Revision: 39421 URL:
http://svn.reactos.org/svn/reactos?rev=39421&view=rev
Log: - Ignore lpResult parameter Modified: trunk/reactos/dll/win32/advapi32/service/scm.c Modified: trunk/reactos/dll/win32/advapi32/service/scm.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advapi32/service…
============================================================================== --- trunk/reactos/dll/win32/advapi32/service/scm.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/advapi32/service/scm.c [iso-8859-1] Thu Feb 5 14:19:32 2009 @@ -1055,7 +1055,7 @@ return FALSE; } - if (!pcbBytesNeeded || !lpServicesReturned || !lpResumeHandle) + if (!pcbBytesNeeded || !lpServicesReturned) { SetLastError(ERROR_INVALID_ADDRESS); return FALSE;
15 years, 10 months
1
0
0
0
[janderwald] 39420: - Fix returned length for RGetServiceKeyNameW - Perform parameters check in right order in ROpenServiceW
by janderwald@svn.reactos.org
Author: janderwald Date: Thu Feb 5 14:18:11 2009 New Revision: 39420 URL:
http://svn.reactos.org/svn/reactos?rev=39420&view=rev
Log: - Fix returned length for RGetServiceKeyNameW - Perform parameters check in right order in ROpenServiceW Modified: trunk/reactos/base/system/services/rpcserver.c Modified: trunk/reactos/base/system/services/rpcserver.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/services/rpcse…
============================================================================== --- trunk/reactos/base/system/services/rpcserver.c [iso-8859-1] (original) +++ trunk/reactos/base/system/services/rpcserver.c [iso-8859-1] Thu Feb 5 14:18:11 2009 @@ -2445,18 +2445,18 @@ if (ScmShutdown) return ERROR_SHUTDOWN_IN_PROGRESS; + hManager = (PMANAGER_HANDLE)hSCManager; + if (!hManager || hManager->Handle.Tag != MANAGER_TAG) + { + DPRINT1("Invalid manager handle!\n"); + return ERROR_INVALID_HANDLE; + } + if (!lpServiceHandle) return ERROR_INVALID_PARAMETER; if (!lpServiceName) return ERROR_INVALID_ADDRESS; - - hManager = (PMANAGER_HANDLE)hSCManager; - if (!hManager || hManager->Handle.Tag != MANAGER_TAG) - { - DPRINT1("Invalid manager handle!\n"); - return ERROR_INVALID_HANDLE; - } /* FIXME: Lock the service list */ @@ -2872,7 +2872,7 @@ dwError = (*lpcchBuffer > dwLength) ? ERROR_SUCCESS : ERROR_INSUFFICIENT_BUFFER; - *lpcchBuffer = dwLength * 2; + *lpcchBuffer = dwLength; return dwError; }
15 years, 10 months
1
0
0
0
[janderwald] 39419: - Add more error checks which reduce winetest errors
by janderwald@svn.reactos.org
Author: janderwald Date: Thu Feb 5 13:13:35 2009 New Revision: 39419 URL:
http://svn.reactos.org/svn/reactos?rev=39419&view=rev
Log: - Add more error checks which reduce winetest errors Modified: trunk/reactos/dll/win32/advapi32/service/scm.c Modified: trunk/reactos/dll/win32/advapi32/service/scm.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advapi32/service…
============================================================================== --- trunk/reactos/dll/win32/advapi32/service/scm.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/advapi32/service/scm.c [iso-8859-1] Thu Feb 5 13:13:35 2009 @@ -1025,6 +1025,48 @@ TRACE("EnumServicesStatusA() called\n"); + if (!hSCManager) + { + SetLastError(ERROR_INVALID_HANDLE); + return FALSE; + } + + if (dwServiceType != SERVICE_DRIVER && dwServiceType != SERVICE_WIN32) + { + if (pcbBytesNeeded && lpServicesReturned) + { + *pcbBytesNeeded = 0; + *lpServicesReturned = 0; + } + + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } + + if (dwServiceState != SERVICE_ACTIVE && dwServiceState != SERVICE_INACTIVE && dwServiceState != SERVICE_STATE_ALL) + { + if (pcbBytesNeeded) + *pcbBytesNeeded = 0; + + if (lpServicesReturned) + *lpServicesReturned = 0; + + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } + + if (!pcbBytesNeeded || !lpServicesReturned || !lpResumeHandle) + { + SetLastError(ERROR_INVALID_ADDRESS); + return FALSE; + } + + if (!lpServices && cbBufSize != 0) + { + SetLastError(ERROR_INVALID_ADDRESS); + return FALSE; + } + RpcTryExcept { dwError = REnumServicesStatusA((SC_RPC_HANDLE)hSCManager, @@ -1407,7 +1449,9 @@ if (!lpDisplayName) { SetLastError(ERROR_INVALID_ADDRESS); - *lpcchBuffer = 1; + + if (!lpServiceName) + *lpcchBuffer = 1; return FALSE; } @@ -2295,6 +2339,12 @@ TRACE("QueryServiceStatus(%p, %p)\n", hService, lpServiceStatus); + if (!hService) + { + SetLastError(ERROR_INVALID_HANDLE); + return FALSE; + } + RpcTryExcept { /* Call to services.exe using RPC */ @@ -2333,6 +2383,12 @@ DWORD dwError; TRACE("QueryServiceStatusEx() called\n"); + + if (InfoLevel != SC_STATUS_PROCESS_INFO) + { + SetLastError(ERROR_INVALID_LEVEL); + return FALSE; + } RpcTryExcept {
15 years, 10 months
1
0
0
0
← Newer
1
...
37
38
39
40
41
42
43
...
56
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
Results per page:
10
25
50
100
200