Commit graph

15 commits

Author SHA1 Message Date
Hermès Bélusca-Maïto b75ee7fd14 [CSRSRV]
- Zero-out some allocated memory.
- During my investigations preceding the implementation of AttachConsole (r58166), I wanted (in a first attempt; finally I've found a better way to achieve what I wanted to do) to retrieve the CSR_PROCESS structure of the parent of a given process. I've found the 'Parent' member in the CSR_PROCESS structure, however this member was always initialized to NULL when new processes were created via CsrCreateProcess (and via the call to CsrInsertProcess). After looking at some informating here (http://svn.reactos.org/svn/reactos/trunk/reactos/include/subsys/csr/server.h?r1=17363&r2=17362&pathrev=17363) and there (http://forum.sysinternals.com/csrwalker-processes-detection-from-user-mode_topic15457.html), I became convinced that the 'Parent' member was unexistent starting from Windows Server 2003. Also, after much more investigation, I've found that the CsrInsertProcess function was called with only two parameters starting from Windows Server 2003 (and still continues in Windows 7), the always-NULL paramater being removed.
Therefore, I remove that unneeded parameter from CsrInsertProcess and the corresponding 'Parent' member from CSR_PROCESS.

svn path=/branches/ros-csrss/; revision=58232
2013-01-26 21:23:10 +00:00
Hermès Bélusca-Maïto 074466b15e [CSRSRV]
Initialize an uninitialized variable.

svn path=/branches/ros-csrss/; revision=58158
2013-01-12 00:33:55 +00:00
Hermès Bélusca-Maïto 0345e745fd [BASESRV]
Remove a temporary DPRINT1.

[CSRSRV]
- Shut down debug output.
- Fix some misspellings.
- Fix a bug in CsrMoveSatisfiedWaits ("satisfied" waits are waits where WaitFunction was put to NULL during a previous call to CsrNotifyWait, but still not dereferenced, and which can be dereferenced by a call to CsrDereferenceWait).

svn path=/branches/ros-csrss/; revision=58103
2013-01-03 17:18:19 +00:00
Hermès Bélusca-Maïto 0444a3a392 [CONSRV]
- Be sure that we reply to the dying client when he dies.
- "Improve" a debug output (display the client process).
- Use existing helper functions for incrementing reference counts for threads and processes.

svn path=/branches/ros-csrss/; revision=58075
2013-01-01 02:59:31 +00:00
Hermès Bélusca-Maïto 5a7730db99 [CONSRV]
However here, we must keep the incrementation at the end of the loop, because of a possible corner case (a loop-break which takes place when we reach the last element of the list, but NextEntry already points to its head because of the cyclicity of the list) with the following 'if'-test made just after the loop.

svn path=/branches/ros-csrss/; revision=57867
2012-12-11 01:45:49 +00:00
Hermès Bélusca-Maïto e63aae82fe [CONSRV]
Put the "Move to the next entry" code just after retrieving list record, because it is less bug-prone.
Indeed correct a bug in CsrDestroyProcess where we were doing an infinite loop when trying to notify existing CSR waits, because NextEntry was set to the CsrProcess->ThreadList.Flink element (head) of the list.

svn path=/branches/ros-csrss/; revision=57866
2012-12-11 01:25:57 +00:00
Hermès Bélusca-Maïto ae88c763da [CSRSRV]
- Remove unused functions CallHardError and CsrHandleHardError (in fact calling the hard error callback is already done in the listening thread).
- Add an annotation and correct a typographical error; remove old comments.
- Remove the now unneeded csrplugin.h header (a relic of the old callback system of the old csrss/csrsrv).

svn path=/branches/ros-csrss/; revision=57741
2012-11-20 19:34:03 +00:00
Hermès Bélusca-Maïto 6716529b84 [CSRSRV]
- Comments formatting.
- Correct a nasty initialization bug which unveiled itself as, eg., critical sections being already initialized in consoles, whereas we were creating new ones. It was because we didn't copy correctly per-process server data from parent process to child process. Now consoles initialize finely.

Now, only modifications to the console subsystem remain to make it totally conform to the new messaging structures of csrss (I mean, using the capture buffers).

svn path=/branches/ros-csrss/; revision=57703
2012-11-13 23:45:02 +00:00
Hermès Bélusca-Maïto bc0af6b272 [CSRSRV]
- Use a variable ServerDll instead of using each time CsrLoadedServerDll[i], as it is done in some other places.
- Clean the code (remove extra-parentheses).
- Zero-out the memory buffer allocated for CsrSrvSharedStaticServerData.

svn path=/branches/ros-csrss/; revision=57701
2012-11-13 21:08:19 +00:00
Hermès Bélusca-Maïto d736f0b914 [NTDLL]
- Add parameter annotations.
- Improve CSR buffer allocation with 4-byte align.
- Simplify the capture-buffer pointers settings.

[CSRSRV]
- Remove last console structure from csrsrv.h (in next commits it will be placed in a proper header).
- Enable global CSR debugging (for debugging purposes... ;-) ).
- api.c: Enable debugging.
- api.c/.h: Remove old code and deprecated unused definitions.
- Use the Win2k3-compliant version of CsrCreateThread (code from subsystems/csr/csrsrv) (TODO: correct its usage in basesrv:BaseSrvCreateThread).
- init.c: Implement a helper routine, CsrInitCsrRootProcess, in order to initialize the per-process server data (see CSR_PROCESS structure) in the Root CSR process. New process inherit it from this Root process.
- server.c - Add a DPRINT. Remove a hack. Correct a parameter passing.
- session.c - Remove a hack (it will go to the new process initialization in consrv)
- Disable the code of CsrConnectToUser while user32:ClientThreadSetup doesn't work.
- Correct the implementation of CsrValidateMessageBuffer.
- Basic implementation of CsrValidateMessageString using CsrValidateMessageBuffer.

TODO:
- Compare CsrpHandleConnectionRequest with the other one function in api.c.
- Compare CsrValidateMessageBuffer with Win32CsrValidateBuffer ?

svn path=/branches/ros-csrss/; revision=57673
2012-11-05 00:23:58 +00:00
Hermès Bélusca-Maïto cbcea7d2f7 [CONSRV/WINSRV]
- Fix structures usage and headers inclusions.
- Make winsrv compile.
- Deactivate some code related to processes enumeration (for testing purposes).

svn path=/branches/ros-csrss/; revision=57620
2012-10-25 22:14:46 +00:00
Hermès Bélusca-Maïto b507bd0612 [CSR/BASESRV/CONSRV/WINSRV]
- Fix code headers. No code changes.
- Rename csrcl.h to csr.h for readability purposes.
- exitros.c --> shutdown.c

svn path=/branches/ros-csrss/; revision=57618
2012-10-25 20:40:41 +00:00
Hermès Bélusca-Maïto a195c2bcb5 [NTDLL]
- Fix a variable and a header names.

[CSR]
- Move all the interesting code from the "old" csrsrv (see r57579) to the new one. TODO: finish to reorganize the code.
- Rename the headers to a standard naming I will use for the other server dlls.
- Remove now unneeded files.
(one can sometimes find commented names next to declaration of variables: it is when a variable name doesn't satisfy me because it isn't enough self-explaining for my taste).

[CONSOLE]
- Add a new header for console working (win32csr --> consrv.dll == the console part of winsrv.dll I separate from it, because I plan a profound reworking on the console after all that).


svn path=/branches/ros-csrss/; revision=57591
2012-10-22 00:09:51 +00:00
Hermès Bélusca-Maïto 13fc08ccc7 [NTDLL/KERNEL32]
- Use new naming scheme.

[CSRSRV]
- Continuing headers reorganization.
- Activate new code.

[CSRSRV/WIN32CSR]
- Move some code into basesrv.

[BASESRV]
- Add basesrv.dll
The names of the APIs tables come from http://j00ru.vexillium.org/csrss_list/api_list.html as usual,
however I used the NT 4 ones for testing purposes only. After that I will update them to 2k3 version
and add function stubs. Also some variable names are deduced from the subsystems/win32/csrss/csrsrv/server.c ones.

svn path=/branches/ros-csrss/; revision=57587
2012-10-20 21:03:32 +00:00
Hermès Bélusca-Maïto 71a7fe86e4 [CSRSS/CSRSRV]
- Reorganize the source code tree.

(Branch build still broken)

svn path=/branches/ros-csrss/; revision=57582
2012-10-20 13:28:09 +00:00
Renamed from subsystems/win32/csrss/csrsrv/procsup.c (Browse further)