Commit graph

23499 commits

Author SHA1 Message Date
Timo Kreuzer b824f04492 remove focus from window, when it gets diabled
- fixes bug 843
See issue #843 for more details.

svn path=/trunk/; revision=25412
2007-01-10 04:51:27 +00:00
Alex Ionescu 6af685313a - Commit NTLPC and remove old implementation.
- Yeah, this adds another regression on top of the new Ob stuff, but in the end it's for the better, as it removes more race conditions and buggy code.
- This whole week I've fixed about 45 bugs and removed a dozen race conditions, sorry for the 2-3 regressions, they will be fixed ASAP. 
- DELETE MAKEFILE.AUTO BEFORE BUILDING THIS BUILD.

svn path=/trunk/; revision=25411
2007-01-10 04:27:40 +00:00
Timo Kreuzer d8160f0676 Make NtUserSetFocus accept NULL window.
svn path=/trunk/; revision=25410
2007-01-10 04:23:33 +00:00
James Tabor 78749a977a Should be 7 zeros not 6.
svn path=/trunk/; revision=25409
2007-01-10 03:42:10 +00:00
Alex Ionescu 70d1578a28 - Implement ObReferenceProcessHandleTable and ObDereferenceProcessHandleTable and use them where appropriate to avoid race issues if the process is being killed meanwhile.
- Implement ObpReferenceProcessObjectByHandle and simplfy ObDuplicateObject.
- Disable hard errors while closing handles, and protect against races. Also print our error message since it seems handles aren't being closed now (message displays leak count).
- Honour DUPLICATE_CLOSE_SOURCE during failure paths in ObDuplicateObject, and catch race conditions.
- Add some more sanity checks and speed up some internal referencing.

svn path=/trunk/; revision=25408
2007-01-10 03:35:59 +00:00
Alex Ionescu 6e3ccb6ffd - Fix a bug in ExfWakePushLock.
- Implement object directory locking to avoid race conditions in Ob and enable most of the query referencing code.

svn path=/trunk/; revision=25407
2007-01-10 01:00:46 +00:00
Eric Kohl 8fb22da8e5 - Add currency page controls.
- Display currency format information.

svn path=/trunk/; revision=25406
2007-01-09 23:00:21 +00:00
James Tabor 208da846ac Implement new keyboard driver and layout structures to help Saveliy Tretiakovs LoadKeyboardLayout implementation.
svn path=/trunk/; revision=25405
2007-01-09 22:55:40 +00:00
Johannes Anderwald cf06d4975f Updated French translation by Pierre Schweitzer 2007 (heis_spiter AT hotmail DOT com)
See issue #1969 for more details.

svn path=/trunk/; revision=25404
2007-01-09 22:02:17 +00:00
Alex Ionescu f9c3ffa9d1 - Heavy cleanup of locking and lookup macros in ob_x.h.
- Add calls to ObpInitializeDirectoryLookup where required.
- Fixup calls to ObpAcquireDirectoryLockExclusive, but still keep them stubbed out for now.

svn path=/trunk/; revision=25403
2007-01-09 21:48:26 +00:00
Johannes Anderwald 9b6f258861 - czech translation by Kamil Hornicek, hornik1@fel.cvut.cz
See issue #1959 for more details.

svn path=/trunk/; revision=25402
2007-01-09 21:21:52 +00:00
Johannes Anderwald 87b814835f - i prefer tabs
svn path=/trunk/; revision=25401
2007-01-09 20:41:14 +00:00
Alex Ionescu 43075eb308 - Fix Port and Section Object Type creation by specifying a valid ValidAccessMask when creating the types.
- NTLPC "Branch": Ports need to maintain a Type List.
- Use proper access mode in parse callbacks.
- Properly validate the access mask given to ObpCreate(Unnamed)Handle and only grant valid bits according to ValidAccessMask.
- Use InterlockedExchangeAdd for reference count bias instead of looping on a single increment.
- Only return the object if the caller did any bias to it.
- Detach from the process much later, since exclusive process support and handle table database needs to be in the same context as the owner.
- Add audit calls to ObpCreateHandle.
- Add stubbed out calls to ObpCleanupDirectoryLookup in ObpCreateHandle.

svn path=/trunk/; revision=25400
2007-01-09 17:18:22 +00:00
Christoph von Wittich d12b251a36 don't include the Iso targets in the workspace
svn path=/trunk/; revision=25399
2007-01-09 12:28:30 +00:00
Magnus Olsen 022849644c minor changes, for be use later, adding some new data types
svn path=/trunk/; revision=25398
2007-01-09 10:53:19 +00:00
Alex Ionescu 3a79b7cfd8 - Hold reference to the current directory and to the current parent directory during lookups.
- Add more stubbed out cleanup code.

svn path=/trunk/; revision=25397
2007-01-09 09:37:36 +00:00
Alex Ionescu 5676292f72 - Complete the hack that's already in SeAccessCheck to also return STATUS_SUCCESS if we return TRUE always. Otherwise, code might weirdly fail.
- Save parent directory during lookups and check if the caller has the right to traverse it, if we ever need to.
- Optimize the configuration of the lookup context so that it's only done when necessary, add stub calls to lock the directory.

svn path=/trunk/; revision=25396
2007-01-09 09:30:43 +00:00
Alex Ionescu 96b09e8f09 - Add missing code to ObpLookupDirectoryEntry.
- Add calls to ObpInitailizeDirectoryLookup.
- Add calls to ObpCleanupDirectoryLookup but disable them for now.
- Add calls to ObpAcquireDirectoryLock but disable them for now.

svn path=/trunk/; revision=25395
2007-01-09 09:07:36 +00:00
Alex Ionescu fe1190c599 - Enable sanity check in ObInsertObject to catch assholes that were calling it incorrectly (without a Handle output parameter, which is only allowed in a specific scenario). Changes:
- Registry code which was calling ObInsertObject for no reason at all. Now an ugly hack has been added to Cm code to perform the only operation the insert did -> to free the create info.
   - SeSubProcessToken was broken and calling it incorrectly, fixed.
   - \Device\PhysicalMemory was being inserted incorrectly, fixed.
   - Boot-time driver objects were being inserted for no reason, call removed.
- Support the only case of ObInsertObject where it is OK to call it without an output handle. This codepath will only charge quota instead of creating the full-blown handle.

svn path=/trunk/; revision=25394
2007-01-09 08:38:07 +00:00
Alex Ionescu 612a4059a4 - Merge some local changes from my version of ObpLookupObjectName:
- Fixup the way we allocate object names: use paged pool instead of non-paged pool, detect insufficient memory case, detect failure to insert entry into the object directory, use name length, not maximum length when copying, use RtlCopy, not RtlMove.
   - Support forcing of case-insensitivity and OBJ_FORCE_ACCESS_CHECK.
   - Call ObCheckCreateObjectAccess and fail if access isn't granted.
   - Call ObpCheckTraverseAccess if traversing a directory fomr user-mode and fail lookup if access wasn't granted.
   - Fixup return of proper error code if we reparsed.
   - Add FIXME note for SeCreateGlobalPrivilege check which is missing.
   - Add callout IRQL checks around parse callouts.
   - Rename some variables for clearer meaning.
   - Add an extra reference when calling the parse routine in the reparse case.

svn path=/trunk/; revision=25393
2007-01-09 07:54:19 +00:00
Alex Ionescu 6829abde13 - Add internal macros for acquiring the object directory pushlock during lookup (not yet used).
- Add internal macros for incrementing/decrementing query references, and use them where appropriate. Do not yet support the path for an object which is currently being defer deleted.
- Add internal macros for cleaning up a directory lookup (not yet used and needs renaming/cleanup), initializing a directory lookup (not yet used).
- Don't call security callback in ObpDeleteNameCheck. Make sure permanent flag is still cleared after acquiring type lock. Add special call for symboilc links. Add commented out calls to lock the object directory.

svn path=/trunk/; revision=25392
2007-01-09 07:28:40 +00:00
Timo Kreuzer 0202185efa implement SPI_SETNONCLIENTMETRICS in SystemParametersInfoA
svn path=/trunk/; revision=25391
2007-01-09 01:19:52 +00:00
Christoph von Wittich 5b83954756 -don't create project files for the ISO targets
-use the new extended_obj_names to prevent C::B from linking the wrong libs
-change project file version to 1.6
-compile spec, S, asm and idl files
-delete the temp rc files after building

svn path=/trunk/; revision=25390
2007-01-09 00:17:23 +00:00
Alex Ionescu 9de4aee541 - Make ObpReleaseCapturedName an actual function and rename it to ObpFreeObjectNameBuffer. Fix a bug in this function which was causing it to attempt freeing the UNICODE_STRING structure instead of the actual buffer.
- Implement ObpAllocateObjectNameBuffer instead of inlined code in ObpCaptureObjectAttributes. Enable usage of the Name Buffer Lookaside List since the bug in ObpFreeObjectNameBuffer has now been fixed. This should result in significant speedup and less fragmentation of pool memory.
- Allocate object names in the paged pool instead of non-paged pool, if we can't use the lookaside list.

svn path=/trunk/; revision=25389
2007-01-08 21:02:22 +00:00
Eric Kohl 00207351ec - Add hit-testing to the preview control (almost complete).
- Add selected item combobox.
- Select item in the combobox upon clicking on an item in the preview window.

svn path=/trunk/; revision=25388
2007-01-08 20:55:47 +00:00
Alex Ionescu 27fda62288 - "No files where added or changed, there is nothing to see here" <= Yeah, thanks a lot Tortoise.
svn path=/trunk/; revision=25387
2007-01-08 20:52:45 +00:00
Timo Kreuzer adf72c70d0 Clean up tabs / spaces mix (no code change)
svn path=/trunk/; revision=25386
2007-01-08 20:01:04 +00:00
Alex Ionescu 8c9205dfd5 - Implement ObpCreateSymbolicLinkName and enable call to the function. It shouldn't do any work currently because we don't have DOS Device Maps.
- Also stub ObpDeleteSymbolicLinkName since it'll probably be needed later.

svn path=/trunk/; revision=25385
2007-01-08 19:52:49 +00:00
Alex Ionescu 76de33fe36 - Implement ObFindHandleForObject and add it to the NDK. However, it depends on ExEnumHandleTable which is still unimplemented.
- Fix up prototype of the function (it returns TRUE/FALSE, not NTSTATUS) and fix callers to use it properly.
- Also add ExEnumHandleTable to NDK.

svn path=/trunk/; revision=25384
2007-01-08 19:40:10 +00:00
Alex Ionescu 30bc8d330f - Fix some NDK dependency problems.
svn path=/trunk/; revision=25383
2007-01-08 18:11:24 +00:00
Alex Ionescu a9b16dfb0e - Fix kmtest's inclusion of the NDK.
- Implement support for the Handle Count Database.
- Don't do anything in IopCloseFile if this isn't the last handle for the process.
- Fix definition of OBJECT_HANDLE_COUNT_DATABASE.

svn path=/trunk/; revision=25382
2007-01-08 17:56:56 +00:00
Alex Ionescu a9e4074bd0 - Fix build. Sorry, forgot that the last commit also included changes to FsrtlAreNamesEqual to raise an exception if upcasing the strings failed.
svn path=/trunk/; revision=25381
2007-01-08 17:49:44 +00:00
Alex Ionescu a22a4040cc - Add authors' names.
svn path=/trunk/; revision=25380
2007-01-08 17:22:15 +00:00
Alex Ionescu cbd8c78730 - Delete /fs directory.
- Add /fsrtl directory with new file structure and remove all the code except for some smaller "known-working" functions.
- Reason for this is that FsRtl now has a new owner (Dominique Coté) and he will be implementing and testing proper versions of the routines.

svn path=/trunk/; revision=25379
2007-01-08 16:51:06 +00:00
Peter Ward 7ce1744f9a - Fix some annoying warnings in wrc.
- Fixed a warning in winebuild.

svn path=/trunk/; revision=25373
2007-01-08 08:48:28 +00:00
Alex Ionescu 74332efe63 - Fix ObReferenceObjectByName to do proper name validation checks.
- Fix ObReferenceObjectByName to call ObpCheckObjectReference before allowing the caller to obtain the reference.
- Rename ObFindObject to ObpLookupObjectName and shuffle parameters around and add some placeholder code that resets the object pointer of the lookup context.
- Modify ObpChargeQuotaForObject to also return if this is a new object.
- Modify ObpDecrementHandleCount to detect when objects with a handle database are being used. Also protect close callout with checks. Protect ObpCloseHAndleTableEntry's callouts with checks as well.
- Update logic of ObpIncrementHandleCount and ObpIncrementUnnamedHandleCount to handle currently exclusive objects as well as new handles with OBJ_EXCLUSIVE. Also detect objects that require handle databases and protect callouts.
- Support CreatorInfo and the TypeList in ObpIncrementHandleCount. Also update the TotalNumberOfHandles in the object type properly.
- Fixup object type lock usage in these routines.
- Do proper invalid attributes check in ObOpenObjectByName, and also use a buffer from the pool instead of the stack.
- Make ObInsertObject detect invalid object insertions and change some parameter names and checks.
- Add stub code to validate the access mask in ObInsertObject. Proper initailize some lookup variables before starting lookup.
- Add detection for symbolic link inserts which require some handling code later on.
- Free the create information at the right moment isntead of too late.
- Add some missing Ob functions, flags and types to the NDK. Fix OBJECT_DIRECTORY structure to use EX_PUSH_LOCK for locks, not ERESOURCE.

svn path=/trunk/; revision=25372
2007-01-08 08:03:47 +00:00
Alex Ionescu 956ae8b6f1 - Changes to lookup context set-up as place-holder and compatibility for future patch. Only configure the lookup context once, outside the initial loop, instead of configuring it with the same settings at each iteration.
svn path=/trunk/; revision=25371
2007-01-08 07:54:57 +00:00
Alex Ionescu 569e9458d6 - Validate lookup context in ObpInsertEntryDirectory.
- Read actual ObpLUIDDeviceMapsEnable variable do determine if shadow-searching is enabled in ObpLookupEntryDirectory.
- Currently disable all directory locking code (it was never used anyways) in ObpLookupEntryDirectory.
- Update ObpLookupEntryDirectory with placeholder code/branches for future patch implementing directory locks.

svn path=/trunk/; revision=25370
2007-01-08 07:53:50 +00:00
Alex Ionescu d107f7d0f4 - Set an invalid pointer as the object header's type when freeing it, to detect invalid usage.
- Optimize type mutex acquisition in ObpDeleteObject. Also optimize freeing of the unicode_String containing the name. Also add callout checks/protection during the security and delete procedure callouts.
- Acquire object type mutex during modification of the OB_FLAG_PERMANENT flag in ObpSetPermanentObject.
- Initialize default QueryReferences field to 1 during object allocation.
- Support undocumented 0x10000 object attribute flag used in Windows 2003 SP1 and higher to protect objects from user-mode access (such as PhysicalMemory).
- Use InterlockedIncrements for ObjectType accounting outside the type lock.
- Clear the lookup context's object pointer for future use.

svn path=/trunk/; revision=25369
2007-01-08 07:51:07 +00:00
Alex Ionescu 5626181735 - Implement ObCheckCreateObjectAccess, ObpCheckTraverseAccess, ObpCheckObjectReference. These APIs are not used yet but are all very similar to ObCheckObjectAccess. There are used at different places by Ob to make sure that the current token and access rights permits some privileged operations such as directory traversal, object referencing and object creation.
svn path=/trunk/; revision=25368
2007-01-08 07:46:17 +00:00
Alex Ionescu ee811ba102 - Add ObDereferenceObjectDeferDelete to NDK.
svn path=/trunk/; revision=25367
2007-01-08 07:44:22 +00:00
Alex Ionescu 50de0ce133 - Fix a bug in ExReleasePushLock which broken contention checking.
svn path=/trunk/; revision=25366
2007-01-08 07:43:49 +00:00
Alex Ionescu a46e532da9 - Fix ntdll and usetup not to use OBJ_OPENLINK on symbolic links. This attribute is for registry keys, not symlinks.
svn path=/trunk/; revision=25365
2007-01-08 07:43:18 +00:00
Alex Ionescu 1c15cd5161 - Fix _PsProcessType for MSVC compilation.
svn path=/trunk/; revision=25364
2007-01-08 07:42:38 +00:00
Christoph von Wittich 013562e393 fixed most of the memory leaks
svn path=/trunk/; revision=25363
2007-01-08 02:40:38 +00:00
Christoph von Wittich 091af4eeea added defines for GetClassLongPtrA/W
svn path=/trunk/; revision=25362
2007-01-08 02:29:32 +00:00
Timo Kreuzer 29e164cf19 - implement SPI_GETMINIMIZEDMETRICS and SPI_SETMINIMIZEDMETRICS in IntSystemParametersInfo and UserSystemParametersInfo
- add both to SystemParametersInfoA
See issue #1668 for more details.

svn path=/trunk/; revision=25361
2007-01-08 02:18:58 +00:00
Timo Kreuzer 15b82d28e7 implement SPI_SETNONCLIENTMETRICS in IntSystemParametersInfo and UserSystemParametersInfo
svn path=/trunk/; revision=25360
2007-01-08 00:23:15 +00:00
Hervé Poussineau dafa988988 Fix compilation
svn path=/trunk/; revision=25359
2007-01-07 23:55:50 +00:00
Timo Kreuzer a423de55e0 Add German resource for wordpad.
svn path=/trunk/; revision=25358
2007-01-07 23:13:41 +00:00