According to Fireball, this file is clean because it contains only well-known interlocked operations taking up a few asm instructions
svn path=/trunk/; revision=22307
- Get rid of a dozen of debug prints that have been straying along for a long time (some for years), most of which I must shamefully admit I am responsible for.
- Fix a critical bug subsystem bug in smss and don't hang the system 15 seconds on boot-up.
- Rebase some problematic modules (and fix wshtcpip's rbuild file) to avoid relocations on bootup and some process startup.
- Enable lsass startup in winlogon and the registry.
- Only show debug log header when actually debugging to a file.
svn path=/trunk/; revision=22305
- Simplified NtDuplicateObject to a simple stub around ObDuplicateObject, there is no need to have lengthy hacks for NtCurrentProcess/NtCurrentThread().
- Cleanup ObDuplicateObject to use normal Ob routines instead of grovelling through handle table structures and manually touching the handle count: It now calls ObpIncrementHandleCount and all the underlying operations are done on the duplicated handle. Also access state creation is done if the duplicated handle has different desired access.
svn path=/trunk/; revision=22303
- Clean-up is enabled now, so basically it's possible to run the test a number of times in win2k3, and every time it will go from scratch by creating everything. But I have a feeling that deleting object-types causes some type of corruption. To be investigated later.
svn path=/trunk/; revision=22302
- Check that mandatory arguments are provided
- Better tracing system
- Prepend private function names with SETUP_
- Use MultiByteToUnicode instead of MultiByteToUnicode + HeapAlloc
- ...
svn path=/trunk/; revision=22299
To run km regression tests under windows, one should use kmtloader.exe app
To run them on reactos, one should copy kmtest.sys to reactos\system32\drivers, and uncomment entries in hivesys.inf
svn path=/trunk/; revision=22296
- Export ObCloseHandle since it's implemented now
- Implement ObpCreateUnnamedHandle and ObpIncrementUnnamedHandleCount as optimizations for ObInsertObject with unnamed objects.
svn path=/trunk/; revision=22294
- Gut down IopCreateFile to the strict minimum so that only the critical parts remain.
- NT Compatiblity fix in ObFindObject: stop parsing if remaining path is null, this means that the parse routine is done parsing and that -this- is the final object.
svn path=/trunk/; revision=22290
- Added initial part of Ob tests which uses ObCreateObjectType, NtCreateDirectoryObject, ObCreateObject exported APIs.
svn path=/trunk/; revision=22289
- Give Files/Devices a parse routine and currently stubplement it for debugging purposes and trying to figure out a way to kill the IopCreateFile hack.
- Implement ObpChargeQuotaForObject. Using a memory breakpoint in WinDBG I've finally found where the OB_FLAG_CREATE_INFO flag gets masked out. Also attempted a very naive quota charging implementation, but it's a guess and probably wrong (but at least it does...something.)
svn path=/trunk/; revision=22287
- Get rid of ObpGetHandleCountByHandleTable and ObpGetNextHandleByProcessCount.
- Add some function comment headers.
- Move ObMakeTemporaryObject, NtMakeTemporaryObject, NtMakePermanentObject to oblife.c
- Move ObpDeleteNameCheck to obname.c
svn path=/trunk/; revision=22285
- Implement ObCloseHandle, a new XP Export
- Take old NtClose code and write it in ObpCloseHandle, which is the master function that Ntclose/ObCloseHandle share.
- Complete patch requires ExSweepHandleTable to be modified to return the Handle instead of the entry, so that sweeping can be fixed to properly destroy handles and call their OkayToClose, instead of just decrementing a count.
svn path=/trunk/; revision=22284
- Add check for optimized case for objects with no name and no security, but not implemented (ObpIncrementUnnamedHandleCount in Gl00my docs), since I need a better translation then babelfish's.
- Fix ObInsertObject to save the Security Descriptor in the Access State structure. Gl00my mentions this isn't absorbed by SeCreateAccessCheck and I just noticed that too.
- We only need to perform security checks for a new object, in ObInsertObject, not if the object already existed.
- Added proper backout+failure code in ObInsertObject if lookup failed, and also look out for mismatch/exists/collision cases (implemented using simple logic).
svn path=/trunk/; revision=22280
- Re-wrote the way ObInsertObject handles security as described in Chapters 6 and 9 of Gl00my (ie: made it use ObGetObjectSecurity and ObAssignObjectSecurity; ironically, these functions already existed/are exported and could've been used since the start instead of duplicating code).
- Fix ObpReferenceCachedSecurityDescriptor only to touch the cached entry if it actually gets a non-NULL descriptor. Also improved it to return the referenced SD, instead of requiring the caller to do it manually.
svn path=/trunk/; revision=22279
* Create the ACCESS_STATE structure much earlier.
* Actually send the access state and parse context to ObFindObject, when called from ObInsertObject (this should fix some hidden regressions, since they finally get an access state with access masks now).
* Remove some deprecated hacks.
* If inserting the handle failed, cleanup the name and remove it from the directory entry.
* Fix a memory leak because we weren't deleting the access state.
svn path=/trunk/; revision=22278
- Minor/trivial fixes to some Object Security APIs that were left in the dark:
* Use PagedPool instead of NonPagedPool memory, and also tag the allocation for debugging.
* Send needed data to the security procedure instead of NULL/0, including the Generic Mapping, and the actual Security Decriptor.
* Only un-assign the descriptor in case of failure, not all the time (the whole point of the API is to assign it!)
* Tell the caller that memory was NOT allocated if we failed to get the security descriptor.
svn path=/trunk/; revision=22277
- Because of the split, we can now directly only do an Increment when duplicating the handle, since we don't need to create a brand new one. Also, when inheriting, we can now properly do an increment as well, instead of simply manually increasing the handle count (because for each inherited handle, access checks and openprocedure should've still been called).
svn path=/trunk/; revision=22276
* Honour ObjectType passed to the function and fail if it doesn't match.
* Use table-based logic instead of process-based logic for Kernel vs User-mode handles (same change that's been done all over the place, since it requires only one dereference of the process object).
* Do the GENERIC/MAXIMUM_ALLOWED logic directly inside the ACCESS_STATE structure.
* This is where we should call the OpenProcedure (acc. to Gl00my), but this kills win32k -- investigate, #ifed out for now.
* Increase the object type's number of handles as well.
* Set the handle table entry's ObAttributes correctly; the old code seems to have been messing that up.
* Honour the AdditionalReferences parameter and do referencing bias if requested.
* Honour the ReturnedObject parameter to return the object pointer back to the caller.
* Add OBTRACEing to the function.
* If we failed because a handle couldn't be allocated, use the distinguied STATUS_INSUFFICIENT_RESOURCES error code instead of the generic STATUS_UNSCUCESFFUL, and backout all the changes we made by calling ObpDecrementHandleCount.
svn path=/trunk/; revision=22267