- Added stub exports for ObCloseHandle, ObReferenceSecurityDesciptor, ObSetHandleAttributes, ObSetSecurityObjectByPointer so that someday someone can know what needs to be implemented.
- Removed ObGetObjectPointerCount. It is not exported in newer OSes and was always undocumented.
- Move ObQueryObjecctAuditingByHandle to security.c and optimized it not to attach to the system process, as well as to cache the handle table instead of dereferencing the owner process all the time.
svn path=/trunk/; revision=22232
- Bug fixes:
* Remove MAXIMUM_ALLOWED<->GENERIC_ALL conversion, I could find no mention of this in the docs.
* Remove GENERIC_ACCESS <-> RtlMapGenericMask conversion, I could find no mention of this in the docs, and this mapping is only required when creating handles, not when referencing pointers.
- Optimizations:
* Restructure code and remove code which was sometimes duplicated up to 5 times.
* Do not attach/detach from the system process, this isn't required since we're merely getting a kernel pointer from the handle netry.
* Directly increase the pointer count instead of calling ObReferenceObject, since we already have the object header in a variable.
* Cache ObpKernelHandleTable/Process->ObjectTable and use those directly instead of always de-referencing the process.
svn path=/trunk/; revision=22231
- Fix ObReferenceObjectByPointer to actually work like documented instead of doing random incorrect checks. Also add special case for Symbolic Link objects as documented by Caz Yokoyama at Microsoft.
svn path=/trunk/; revision=22230
- Re-implement NtSetInformationObject based on ExChangeHandle and using ObpSetHandleAttributes as a callback.
- Re-implement NtQueryObject's ObjectHandleInformation case to simply return the information that's already in HandleAttributes; there is no point in querying for it all over again.
- Fix NtSetInformationObject not to allow a user-mode call to modify kernel-mdoe handle attributes. Add FIXME for Inheritance permissions check.
- Fix NtQueryObject to properly return OBJ_PERMANENT and OBJ_EXCLUSIVE; these flags are not stored in Handle Attributes.
- Fix NtQueryObject not to attempt referencing the handle if the caller specified AllTypesInformation, because then a handle is not needed.
svn path=/trunk/; revision=22228
- The winetests show that the pointer never moves after calling chsize.
- Using SetEndOfFile is the best way to do this. I wrote a test case that
uses WriteFile as we did before and it did not expand the file past eof.
svn path=/trunk/; revision=22216
- Add initial Kernel-Mode regression testing framework (thanks to Filip Navara for his PnPTest, thanks to Alexandre Julliard for Wine regression testing framework). Framework consists of: the driver (kmtest.sys) and the loader (kmtloader.exe).
svn path=/trunk/; revision=22208
do not mix the doc over malloc and realloc. Thanks filip
<filip2307> malloc(0) -> valid buffer
<GreatLord> then I revert that change
<filip2307> realloc(<non-null pointer>, 0) -> NULL
<filip2307> realloc(NULL, 0) -> valid buffer
svn path=/trunk/; revision=22197