Commit graph

20858 commits

Author SHA1 Message Date
Ged Murphy 0262a2684c update the comctl32 wine tests
svn path=/trunk/; revision=22314
2006-06-11 15:51:13 +00:00
Maarten Bosma 64471203f9 Fix size of the startmenu (e.g. Start->Programs) when there are very much entries. Tested under Windows. Fix by slawek from the German forum.
svn path=/trunk/; revision=22313
2006-06-11 15:16:48 +00:00
Eric Kohl 47a7900e91 Implement PNP_AddID.
svn path=/trunk/; revision=22310
2006-06-11 13:20:46 +00:00
Hervé Poussineau b9bcb95e37 Fix non-optimized versions of InterlockedIncrement/InterlockedDecrement.
Fixes bug 916

svn path=/trunk/; revision=22309
2006-06-11 13:00:47 +00:00
Hervé Poussineau f08c410f39 Move Interlocked* functions to architecture-relative directories. This prevents use of inlined assembler.
svn path=/trunk/; revision=22308
2006-06-11 12:27:27 +00:00
Hervé Poussineau 198f03e34b [AUDIT]
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
2006-06-11 12:15:43 +00:00
Hervé Poussineau df7f875767 Add some tests for interlocked functions
svn path=/trunk/; revision=22306
2006-06-11 12:02:04 +00:00
Alex Ionescu 57dc67574c * Significant improve boot speed and debug log neatness:
- 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
2006-06-11 08:25:10 +00:00
Hervé Poussineau ab794adf1d - Support more than one child
- vbemp shouldn't parse the EDID, so return it to videoprt

svn path=/trunk/; revision=22304
2006-06-11 07:57:37 +00:00
Alex Ionescu 259db9be47 - Fix definitions of OB_QUERYNAME_METHOD and OB_OKAYTOCLOSE_METHOD. Add fixme for OB_SECURITY_METHOD, will change it later.
- 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
2006-06-11 06:52:56 +00:00
Aleksey Bragin d6a84751c7 - Further improvements to Ob tests (fixing obvious mistakes/etc), however reference tests still cause bugcheck, so they are disabled
- 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
2006-06-10 22:39:14 +00:00
Aleksey Bragin 325be5eb8d Alex finally paid attention to my code, so I'm fixing a few things...
svn path=/trunk/; revision=22301
2006-06-10 21:17:43 +00:00
Hervé Poussineau 3e3f927b36 After some tests, change SetupDiClassNameFromGuidExW and SetupDiGetClassDescriptionExW to match Windows XP behavior
svn path=/trunk/; revision=22300
2006-06-10 20:51:18 +00:00
Hervé Poussineau b76c5a1315 Cleanup:
- 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
2006-06-10 20:48:17 +00:00
Aleksey Bragin ac6a23b01f [FORMATTING]
Very small cleanup, formatting and typecasting change

svn path=/trunk/; revision=22298
2006-06-10 20:41:54 +00:00
Aleksey Bragin 4b2ae8cc64 Revert accidental change of ntfs.sys driver's Start value made in last commit
svn path=/trunk/; revision=22297
2006-06-10 20:32:25 +00:00
Aleksey Bragin c87c9cee4a Add loading of kernel-mode regression testing driver into hivesys.inf (it's commented out of course by default).
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
2006-06-10 18:05:44 +00:00
Aleksey Bragin e5502d72f8 - Add create/insert object tests
- Add simple referencing tests (now disabled)
- All tests pass currently on Windows 2003

svn path=/trunk/; revision=22295
2006-06-10 16:37:34 +00:00
Alex Ionescu 51b80d64e3 - Update sweep callback to send the handle number. Patch by Thomas Weidenmueller (w3seek@reactos.org)
- Export ObCloseHandle since it's implemented now
- Implement ObpCreateUnnamedHandle and ObpIncrementUnnamedHandleCount as optimizations for ObInsertObject with unnamed objects.

svn path=/trunk/; revision=22294
2006-06-10 00:41:16 +00:00
Brandon Turner 911fec4841 eol-style:native and some TCHAR fixes
svn path=/trunk/; revision=22293
2006-06-09 15:59:56 +00:00
Hervé Poussineau 6b4f2e1649 Add documentation to SetupDiBuildClassInfoList/SetupDiBuildClassInfoListExA/W
Patch by Christian Gmeiner on wine-patches ML

svn path=/trunk/; revision=22292
2006-06-09 14:16:39 +00:00
Alex Ionescu b9375052c5 - Fix the CmpObjectDelete bugcheck by hacking away some code reponsible for it. The bugcheck is probably the result of the current ref-count bug.
- Remove some more code in IoCreateFile/IopCreateFile to help with deprecating it later.

svn path=/trunk/; revision=22291
2006-06-09 08:49:03 +00:00
Alex Ionescu dc1e926987 - Add the OPEN_PACKET structure to internal headers. Used for the I/O Parse Routine.
- 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
2006-06-09 07:28:26 +00:00
Aleksey Bragin c07a24b350 - Added DPRINT logic in all files (to be used as "TRACE" to aid in debugging of tests)
- Added initial part of Ob tests which uses ObCreateObjectType, NtCreateDirectoryObject, ObCreateObject exported APIs.

svn path=/trunk/; revision=22289
2006-06-08 21:39:51 +00:00
Alex Ionescu 63e1686915 - Remove the heart (but not the brain) of the IopCreateFile hack. A much 'nicer' hack now detects if a filename can't be found, and instead of inserting it into the object directory (wrong!), calling IopCreateFile (wrong!), then having it fail, only to then remove the newly inserted object entry (wrong wrong wrong!), IopCreateFile is now *only* called for real files, otherwise Ob detects the invalid name and fails nicely and quickly.
svn path=/trunk/; revision=22288
2006-06-08 21:36:44 +00:00
Alex Ionescu d7c17c883d - Add Object Header Quota structure/define
- 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
2006-06-08 20:58:21 +00:00
Alex Ionescu 1c378756d0 - Kill a bunch of deprecated hacks, because removing hacks is always cool!
svn path=/trunk/; revision=22286
2006-06-08 19:00:22 +00:00
Alex Ionescu 1891e7787c - [FORMATTING]:
- 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
2006-06-08 18:24:37 +00:00
Alex Ionescu 1f896561d9 - Rename ObpDeleteHandle to ObpCloseHandleTableEntry and change semantics so that it deals directly with the entry and table. This re-factoring optimizes the case where we already have the entry and don't want to use the handle to get the kernel table and then attach/detach/enter/exit critcal regions (such as when sweeping).
- 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
2006-06-08 18:09:01 +00:00
Brandon Turner d372aa6165 If treat a backspace more like a normal char.
svn path=/trunk/; revision=22283
2006-06-08 13:07:05 +00:00
Brandon Turner 3545fe53f7 ReadConsole test to show how backspaces should be handled.
svn path=/trunk/; revision=22282
2006-06-08 12:59:32 +00:00
Alex Ionescu c872f735ba - [FORMATTING] Add function comment headers.
svn path=/trunk/; revision=22281
2006-06-08 06:31:16 +00:00
Alex Ionescu 028c1dff32 - ObFindObject should return the actual object being inserted, in the insert case (otherwise it always returns the root-directory instead...)
- 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
2006-06-08 06:17:46 +00:00
Alex Ionescu 2173f9e4aa - Fix ObGetObjectSecurity to use the object type's pool type instead of assuming PagedPool.
- 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
2006-06-08 05:41:39 +00:00
Alex Ionescu f96e25891f - I just noticed that ObInsertObject never got updated to deal with the improvements in ObFindObject and ACCESS_STATE usage, so made the following fixes:
* 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
2006-06-08 02:56:59 +00:00
Alex Ionescu 0b1df199e3 - Fixup some comments and add Eric Kohl's name to this file, since he had worked on some of the original calls.
- 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
2006-06-08 02:36:12 +00:00
Alex Ionescu d11bb11784 - Split ObpCreateHandle into two distinct operations: Incrementing and Creating (like we have Delete/Decrement). No code additions, just splitting.
- 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
2006-06-07 23:59:15 +00:00
Hervé Poussineau 47b12f6d7d Some 64 fixes
svn path=/trunk/; revision=22275
2006-06-07 17:33:57 +00:00
Hervé Poussineau 9a844e2247 Replace STDCALL by NTAPI
Some 64 bits fixes

svn path=/trunk/; revision=22274
2006-06-07 17:31:43 +00:00
Hervé Poussineau 7e07a60d3a Allocate buffer for system directory on heap instead of stack
svn path=/trunk/; revision=22273
2006-06-07 17:30:06 +00:00
Hervé Poussineau 9d4e17c705 - Implement DecryptFileA
- Fix some stubs
- Remove dead code

svn path=/trunk/; revision=22272
2006-06-07 17:26:25 +00:00
Hervé Poussineau f326c55403 - Implement FileEncryptionStatusA
- Fix FileEncryptionStatusW prototype
- Fix EncryptionDisable stub

svn path=/trunk/; revision=22271
2006-06-07 17:24:49 +00:00
Aleksey Bragin 69778e9422 Add missing debug.h/NDEBUG construction, fixes compiling without CU
svn path=/trunk/; revision=22270
2006-06-07 13:08:28 +00:00
Aleksey Bragin e20a9c6ec4 [AUDIT]
base/system/smss.exe

- Unlock simple and trivial functions
- Unlock unimplemented funcs and non-code things

svn path=/trunk/; revision=22269
2006-06-07 13:06:40 +00:00
Aleksey Bragin d090a2d035 Fix a typo in Internet Time tab. Spotted by hand.of.omega@gmail.com. Fixes bug 1562
svn path=/trunk/; revision=22268
2006-06-07 10:57:40 +00:00
Alex Ionescu da2029d89e - Final fixes to ObpCreateHandle that I can think of before splitting Create/Increment (might be lacking some security checks or trace/database functionality, but I haven't found any info on the latter, while the former I will stub, but I don't have the skills to imlement (ObAssignObjectSecurity)):
* 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
2006-06-07 06:15:59 +00:00
Alex Ionescu 39bf2b48c2 - Change ObpCreateHandle to the one documented and explained in the Gl00my documentation. It also fits the re-factored split create/increment model better, supports open reasons, and allows to do type-checking and extra object referencing from within one routine.
- Add code to ObOpenObjectByName to detect the OpenReason. Experimental, since I'm not sure when to clear the flag.

svn path=/trunk/; revision=22266
2006-06-07 05:37:04 +00:00
Alex Ionescu f36b5d1f3b - Add some trace macros to monitor handle/pointer counts for fixing regressions/bugs later.
- Change ObpCreateHandle to use an ACCESS_STATE structure instead of DesiredAccess. This is to help moving to an updated model where creating and incrementing a handle are 2 operations, so that code can be refactored (similarly to how we now have Delete/Decrement as 2 operations).
- Fix functions that were not creating an ACCESS_STATE Structure to create one locally now, or use the one passed as a parameter, if available.

svn path=/trunk/; revision=22265
2006-06-07 05:04:43 +00:00
Alex Ionescu d2e5bfabe5 - Clone ObpCreateHandle to CmpCreateHandle. I am about to fix its implementation and since Cm* currently abuses Ob I feel it safer to give its own internal function.
- Make ObpCreateHandle internal to Ob as it should be. Change NtCreateProcessTokenEx to use ObOpenObjectByPointer, it has no business manually trying to create a handle. Same goes for ExpLoadInitialProcess.

svn path=/trunk/; revision=22264
2006-06-07 01:47:33 +00:00
James Tabor 2097dade2d Quick patch.
svn path=/trunk/; revision=22263
2006-06-07 01:45:18 +00:00