Author: hbelusca
Date: Sun Mar 3 15:35:12 2013
New Revision: 58415
URL:
http://svn.reactos.org/svn/reactos?rev=58415&view=rev
Log:
[CONSOLE.DLL-KERNEL32-CONSRV]
Fix the console properties dialog, when launching and transmitting console properties.
Before, the properties dialog was directly launched by the console server (consrv),
running with CSRSS (System) privileges, what constituted a security hole. Now, I create a
remote thread in the running process owning the console for launching the properties
dialog (thus it has only user privileges, and not System ones anymore). For that purpose,
I basically took the technique described in the following paper (Cesar Cerrudo,
"Story of a dumb patch",
http://www.argeniss.com/research/MSBugPaper.pdf or
http://www.scn.rain.com/~neighorn/PDF/MSBugPaper.pdf), where basically the console server
shares the console properties via a shared memory section with the console properties
dialog dll. The address of the thread which launches the dialog in the context of the
console app is given to the console server the same way as we do for the control handler
(called e.g. when you press Ctrl-C, etc...)
Of course this is quite hackish, because you have the GUI interface split between the
console server and the console properties dialog dll. Something far more elegant would be
to put all the GUI thingie into a dedicated dll or exe, running with the same privileges
as the console program itself (a kind of console -- or terminal -- emulator).
[CONSOLE.DLL]
Fix retriving / setting colors.c and other things.
[CONSRV.DLL]
- Fix retrieving / setting console properties from the registry (via the HKCU\Console\*
keys), via the shell shortcuts (not totally done at the moment, because somebody has to
implement properly that thing :
http://msdn.microsoft.com/en-us/library/windows/desktop/bb773359(v=vs.85).a…
(NT_CONSOLE_PROPS structure stored as a shortcut data block) (at application launching
time), and via the console properties dialog.
- Few DPRINTs removed.
Added:
branches/ros-csrss/win32ss/user/consrv/settings.c (with props)
branches/ros-csrss/win32ss/user/consrv/settings.h (with props)
Modified:
branches/ros-csrss/dll/cpl/console/CMakeLists.txt
branches/ros-csrss/dll/cpl/console/colors.c
branches/ros-csrss/dll/cpl/console/console.c
branches/ros-csrss/dll/cpl/console/console.h
branches/ros-csrss/dll/cpl/console/font.c
branches/ros-csrss/dll/cpl/console/lang/fr-FR.rc
branches/ros-csrss/dll/cpl/console/layout.c
branches/ros-csrss/dll/cpl/console/options.c
branches/ros-csrss/dll/win32/kernel32/client/console/console.c
branches/ros-csrss/dll/win32/kernel32/client/console/init.c
branches/ros-csrss/dll/win32/kernel32/include/console.h
branches/ros-csrss/include/reactos/subsys/win/conmsg.h
branches/ros-csrss/win32ss/user/consrv/CMakeLists.txt
branches/ros-csrss/win32ss/user/consrv/coninput.c
branches/ros-csrss/win32ss/user/consrv/conio.h
branches/ros-csrss/win32ss/user/consrv/conoutput.c
branches/ros-csrss/win32ss/user/consrv/console.c
branches/ros-csrss/win32ss/user/consrv/consrv.h
branches/ros-csrss/win32ss/user/consrv/guiconsole.c
branches/ros-csrss/win32ss/user/consrv/guiconsole.h
branches/ros-csrss/win32ss/user/consrv/handle.c
branches/ros-csrss/win32ss/user/consrv/init.c
branches/ros-csrss/win32ss/user/consrv/lineinput.c
branches/ros-csrss/win32ss/user/consrv/tuiconsole.c
branches/ros-csrss/win32ss/user/consrv/tuiconsole.h
[This mail would be too long, it was shortened to contain the URLs only.]
Modified: branches/ros-csrss/dll/cpl/console/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/dll/cpl/console/CMake…
Modified: branches/ros-csrss/dll/cpl/console/colors.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/dll/cpl/console/color…
Modified: branches/ros-csrss/dll/cpl/console/console.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/dll/cpl/console/conso…
Modified: branches/ros-csrss/dll/cpl/console/console.h
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/dll/cpl/console/conso…
Modified: branches/ros-csrss/dll/cpl/console/font.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/dll/cpl/console/font.…
Modified: branches/ros-csrss/dll/cpl/console/lang/fr-FR.rc
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/dll/cpl/console/lang/…
Modified: branches/ros-csrss/dll/cpl/console/layout.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/dll/cpl/console/layou…
Modified: branches/ros-csrss/dll/cpl/console/options.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/dll/cpl/console/optio…
Modified: branches/ros-csrss/dll/win32/kernel32/client/console/console.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/dll/win32/kernel32/cl…
Modified: branches/ros-csrss/dll/win32/kernel32/client/console/init.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/dll/win32/kernel32/cl…
Modified: branches/ros-csrss/dll/win32/kernel32/include/console.h
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/dll/win32/kernel32/in…
Modified: branches/ros-csrss/include/reactos/subsys/win/conmsg.h
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/include/reactos/subsy…
Modified: branches/ros-csrss/win32ss/user/consrv/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/consrv/C…
Modified: branches/ros-csrss/win32ss/user/consrv/coninput.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/consrv/c…
Modified: branches/ros-csrss/win32ss/user/consrv/conio.h
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/consrv/c…
Modified: branches/ros-csrss/win32ss/user/consrv/conoutput.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/consrv/c…
Modified: branches/ros-csrss/win32ss/user/consrv/console.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/consrv/c…
Modified: branches/ros-csrss/win32ss/user/consrv/consrv.h
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/consrv/c…
Modified: branches/ros-csrss/win32ss/user/consrv/guiconsole.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/consrv/g…
Modified: branches/ros-csrss/win32ss/user/consrv/guiconsole.h
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/consrv/g…
Modified: branches/ros-csrss/win32ss/user/consrv/handle.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/consrv/h…
Modified: branches/ros-csrss/win32ss/user/consrv/init.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/consrv/i…
Modified: branches/ros-csrss/win32ss/user/consrv/lineinput.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/consrv/l…
Added: branches/ros-csrss/win32ss/user/consrv/settings.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/consrv/s…
Added: branches/ros-csrss/win32ss/user/consrv/settings.h
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/consrv/s…
Modified: branches/ros-csrss/win32ss/user/consrv/tuiconsole.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/consrv/t…
Modified: branches/ros-csrss/win32ss/user/consrv/tuiconsole.h
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/consrv/t…