Commit graph

41140 commits

Author SHA1 Message Date
Timo Kreuzer e6baa6f072 merge r46045
svn path=/trunk/; revision=46046
2010-03-10 00:56:07 +00:00
Hervé Poussineau 4c956b83a7 Link SCSI miniport drivers only to scsiport
svn path=/trunk/; revision=46044
2010-03-09 22:36:52 +00:00
James Tabor 2d2f8b9404 - [User32] sync spy to wine 1.1.40
svn path=/trunk/; revision=46043
2010-03-09 21:14:52 +00:00
Sir Richard 4f05a88e82 [KERNEL32/CSRSS]: Register new Win32 threads with CSRSS. Add a bunch of lookup, creation, allocation, hashing and CSR thread management routines from the unused CSRSRV in trunk.
[CSRSS]: Bang in the new thread support in a bunch of places, including creating static server threads. It's very hacked and handle duplication doesn't work 100% reliably, but it gets the job done.
[CSRSS]: Add CsrGetProcessLuid, CsrImpersonateClient, CsrRevertToSelf, CsrShutdownProcesses, CsrFindProcessForShutdown required for user-mode shutdown. Right now we are able to reliably enumerate user apps (in the user LUID) and then service/system apps (in the LOCAL SYSTEM LUID).

svn path=/trunk/; revision=46042
2010-03-09 20:23:22 +00:00
Sir Richard e2d31e88e4 [KERNEL32]: Bug fix CTRL-C handler registration/deregistration/notification, needed for correct console shutdown behavior.
svn path=/trunk/; revision=46041
2010-03-09 20:13:19 +00:00
Sir Richard 9c91a4dc46 [CSRSS]: Fix yet another bug in the unused csrss code.
svn path=/trunk/; revision=46040
2010-03-09 18:22:25 +00:00
Sylvain Petreolle f316f00072 Convert battery.inf to UTF-16
Add French translation.
Add battery.inf and fdc.inf to syssetup process.

Floppy disk controllers and batteries now appear correctly in device manager.
Dedicated to aicom ;)

svn path=/trunk/; revision=46038
2010-03-09 17:21:29 +00:00
Sir Richard 6b007be4cd [NTOS]: While attempting to ressucitate the user-mode shutdown code in CSRSS (disabled since 2006), it seemed clear that one of the main steps is to obtain the caller's LUID in order to kill the right processes. This LUID is obtained from the current thread's token, and we know it's the callers since we're supposed to impersonate the caller. Unfortunately, impersonation failed, making the whole process fail.
Impersonation failed because NtImpersonateThread was actually inverting the THREAD_IMPERSONATE rights, asking the client thread for the server's permissions, and vice versa. Fixing this resulted in yet another failure.
        Analysis of this failure showed that even opening the server (ie: current) thread for THREAD_DIRECT_IMPERSONATION failed, which is unusual since the current thread should have access to all its rights. This is determined in PspCreateThread when the ETHREAD->GrantedAccess field is set.
        Continuing onto this path, tracing revealed that GrantedAccess was merely 0x1607F and not 0x1F3FF as expected, meaning that not all rights were given, including the impersonate right (0x200), explaining the failure, but not the deeper reason behind it.
        Attempting to identify which code path set this GrantedAccess, the SepAccessCheck routine came to light. A bug there caused MAXIMUM_ALLOWED accesses to fail in certain scenarios, such as when the object had no security descriptor, because MAXIMUM_ALLOWED would be granted as an absolute value, when instead of it is a flag that should grant GENERIC_ALL. Fixing that bug, the failure continued.
        Further analysis identified that the Administrators SID was being found with GENERIC_READ + WRITE + EXECUTE access, and no SID was found for GENERIC_ALL access. This happened when searching the system token's default DACL, which is assigned to the kernel (but for kernel-mode callers, this check was skipped), smss, winlogon, etc.
        The code for creating this system token was heavily hacked, so the function to create the system token, as well as NtCreateToken were refactored to use a common piece of token-creating code. Furthermode, the system token was correctly created with Local System as the user, and Administrators as one of the groups. Finally, SeDefaultDacl was used (already setup properly) instead of a badly configured Default DACL. The new shared code also correctly sets the SE_GROUP_ENABLED flag on all SE_GROUP_MANDATORY groups, and scans tokens to set the TOKEN_HAS_ADMIN_GROUP and TOKEN_HAS_TRAVERSE_PRIVILEGE flags which were not previously set.
        With the correct system token and default DACL, the Local System SID was now found, but the failure continued. This was revealed to be due to an even deeper rooted problem, as the SepIsSidInToken routine checked for SE_GROUP_ENABLED before listing a SID as "present". Although this is correct for actual groups, the User SID will never have the SE_GROUP_ENABLED flag as it is not a group. This caused any granted access ACE belonging to a user (instead of a group) to be ignored, causing either access check failures, or limited rights returned (in the MAXIMUM_ALLOWED case).
        Upon fixing this bug, the NtImpersonateThread call finally returned success, since the rights were now correct. Promptly upon calling NtOpenThreadToken to query the LUID however, the system ASSERTED with FALSE.
        The code at fault was a line in NtOpenThreadTokenEx which forcefully ASSERTed if the impersonation code path was taken, presumably because this was never tested, and ReactOS would actually always fail impersonation attempts due to the bugs fixed above. This routine was thus quickly reworked to fix some mistakes (such as forgetting to actually impersonate the client, incorrect referencing/dereferencing of thread/tokens, and assumptions about DACL creation success).
        Having fixed the NtOpenThreadTokenEx routine, the LUID query now went through for the impersonated token, but soon causing a user-mode crash, due to an incorrect parameter reference in the CsrGetProcessLuid function in the csrsrv code by Alex (which I copy/pasted to reduce code duplication).
        Fixing this final bug finally allowed the correct LUID to be queried and I was able to continue development of not-yet-commited user-mode shutdown code.

svn path=/trunk/; revision=46028
2010-03-09 10:35:58 +00:00
Sir Richard b36899aa50 [WIN32K]: Stub-plement NtUserSetInformationThread for UserInitiateShutdown and UserEndShutdown. I think we're supposed to notify Winlogon at some point, and check for races. Part of new shutdown code.
svn path=/trunk/; revision=46027
2010-03-09 09:26:46 +00:00
James Tabor d5c439798c - [User32_winetest] Restore Timer test.
svn path=/trunk/; revision=46026
2010-03-09 03:48:43 +00:00
James Tabor c03ec91188 - [User32] Fix timer crash when calling proc.
svn path=/trunk/; revision=46025
2010-03-09 03:48:05 +00:00
Sir Richard 7a43a3001f [SETUPLDR]: Fix build breakage caused by hpoussin, by linking minihal into setupldr as well.
svn path=/trunk/; revision=46023
2010-03-09 02:29:25 +00:00
Hervé Poussineau 61fef12a72 [freeldr] Load an additional SCSI driver if present (NTBOOTSYS.SYS on boot partition), to increase number of known storage devices.
Works only with very simple miniport drivers.

svn path=/trunk/; revision=46017
2010-03-08 22:04:38 +00:00
Hervé Poussineau e10fbe352c [headers] Fix type of PRTL_HEAP_PARAMETERS in ifssupp.h. Will be required soon
svn path=/trunk/; revision=46016
2010-03-08 21:42:18 +00:00
Hervé Poussineau 37d9cf31a4 Fix include directories
svn path=/trunk/; revision=46015
2010-03-08 21:40:29 +00:00
James Tabor d89923519b [User32]
- David Hedberg Fix return value for EDIT_EM_Scroll and case where EM_SCROLL with page down results in trying to scroll up past the beginning. Sync to wine 1.1.40.

svn path=/trunk/; revision=46013
2010-03-08 21:24:47 +00:00
James Tabor 8b48dd5b7c - [User32_winetest]
- Msg : Remove more tests from service. test_timers crashed on a callback which passed months ago. The rest are related to TrackMouseEvent and capture.

svn path=/trunk/; revision=46012
2010-03-08 21:20:18 +00:00
Cameron Gutman be17352b40 [CMBATT]
- Add initial cmbatt driver which mostly stubs
 - All it does right now is register a battery device with the battc driver
[BATTC]
 - Add a nearly complete battc driver (the only stuff missing is WMI)
 - Tested with our stubbed cmbatt driver but testing on Windows would be nice too
[BATTERY.INF]
 - Added battery.inf to install battery devices
[MISC]
 - Add cmbatt.sys, battc.sys, and battery.inf to bootcd
 - We still need to implement compbatt.sys
 - PS: Janderwald, you stole my commit number ;)

svn path=/trunk/; revision=46011
2010-03-08 21:09:25 +00:00
Daniel Reimer f780908ae4 Polish translation update by Maciej Bialas.
svn path=/trunk/; revision=46010
2010-03-08 21:08:20 +00:00
James Tabor 6e96e3015c - Fix a crash in user32 winetest msg.
svn path=/trunk/; revision=46009
2010-03-08 21:04:00 +00:00
James Tabor f8fced000d [User32]
- Andrew Nguyen : Ensure That WM_INITDIALOG passes the first tabstop control handle to the dialog procedure.
- Henri Verbeet : Also show dialogs right after a WM_TIMER message.

svn path=/trunk/; revision=46007
2010-03-08 20:57:24 +00:00
James Tabor 63f9072074 - [User32_winetest]
- Win : Remove test_capture from service. This is related to TrackMouseEvent issues which use SetCapture.

svn path=/trunk/; revision=46006
2010-03-08 20:52:04 +00:00
Aleksey Bragin f5a35ee9b2 [PSDK]
- Update all IDLs to Wine-1.1.40. If you feel some of your change was lost, it wasn't needed for building. Please recommit if you still think it's of a high value.

svn path=/trunk/; revision=46005
2010-03-08 20:51:33 +00:00
Sir Richard 8a4845b409 [NTOS]: Have I/O Manager Volume Device Objects register with the Power Manager so that they can receive dope.
[NTOS]: Reimplement NtShutdownSystem.
[NTOS]: Implement NtSetSystemPowerState for the shutdown/reboot cases.
[NTOS]: Use the dope from the volume device objects to flush all writeable (non-floppy) devices. Pending hard-disk changes are now flushed to disks before shutdown.
[NTOS]: Flush \\REGISTRY during shutdown. This flushes all pending changes.
[NTOS]: Call into Cc to flush lazy writer during shutdown.
[NTOS]: Stop killing processes on shutdown. The kernel should not be doing this.
[NTOS]: Don't only shutdown disk file systems, but also cdrom and tape.
[NTOS]: Don't only notify drivers of first-chance shutdown -- also parse the last-change shutdown list.
[NTOS]: Reference drivers registering for shutdown notifications so that they remain loaded for them to get the notification at shutdown.
[NTOS]: Notify drivers that have registered/opened the Power State callback.
[NTOS]: A lot of the Po* power state code is highly simplified, but provides a good roadmap to anyone interested in this functionality long-term.

svn path=/trunk/; revision=46004
2010-03-08 20:47:10 +00:00
Sir Richard c14fc3dc56 [CMLIB]: Just use UNIMPLEMENTED.
svn path=/trunk/; revision=46003
2010-03-08 20:46:53 +00:00
Eric Kohl 02f2e242ff SEH-Protect the call to RSetServiceStatus in SetServiceStatus. This keeps services from crashing when the connection to the service manager fails.
svn path=/trunk/; revision=46002
2010-03-08 20:42:48 +00:00
Sir Richard a15d2634ea [NTOS]: Implement CmSetLazyFlushState to disable lazy writing in the Cm.
[NTOS]: Implement ExSwapInWorkerThreads to in-swap any worker threads when needed.
[NTOS]: Add HAL stubs for HalEndOfBoot and HalSetWakeEnable since most HALs set this to NULL.
[DDK]: Add some missing definitions.

svn path=/trunk/; revision=46001
2010-03-08 20:37:24 +00:00
Johannes Anderwald 95a13b7f8f - Silent traces
svn path=/trunk/; revision=46000
2010-03-08 20:30:51 +00:00
James Tabor 3812c4f83c - [User32] Sync Mdi to wine 1.1.40.
svn path=/trunk/; revision=45995
2010-03-07 21:18:52 +00:00
Hervé Poussineau 19b65ab3fe [freeldr] Add SCSIPORT category to debug messages
Add missing PELOADER entry + fix one debug message

svn path=/trunk/; revision=45994
2010-03-07 20:12:28 +00:00
Daniel Reimer fa403d4bf1 Update reg and msiexec to Wine 1.1.40.
svn path=/trunk/; revision=45992
2010-03-07 14:59:15 +00:00
Sylvain Petreolle 223c0fbbfc [HHCTRL.OCX]
fix build

svn path=/trunk/; revision=45991
2010-03-07 13:26:27 +00:00
Christoph von Wittich 96363863d3 [HHCTRL.OCX]
sync hhctrl.ocx to wine 1.1.40

svn path=/trunk/; revision=45990
2010-03-07 12:48:05 +00:00
Daniel Reimer fcaa30c541 Polish translation update by Maciej Bialas.
svn path=/trunk/; revision=45988
2010-03-07 11:51:02 +00:00
Christoph von Wittich aeda2ffa10 [IMM32]
sync imm32 to wine 1.1.40

svn path=/trunk/; revision=45987
2010-03-07 11:27:14 +00:00
Christoph von Wittich aa25097d0d [ITIRCL]
sync itircl to wine 1.1.40

svn path=/trunk/; revision=45986
2010-03-07 11:21:31 +00:00
Christoph von Wittich 0245cc9535 [ICCVID]
sync iccvid to wine 1.1.40

svn path=/trunk/; revision=45985
2010-03-07 11:20:29 +00:00
Christoph von Wittich 799cad4cd0 [CLUSAPI]
sync clusapi to wine 1.1.40

svn path=/trunk/; revision=45984
2010-03-07 11:15:16 +00:00
Christoph von Wittich 5aded0fba9 [PSDK]
sync xmldom.idl to wine 1.1.40

svn path=/trunk/; revision=45983
2010-03-07 11:10:18 +00:00
Christoph von Wittich c666e0e3e7 [MSCTF]
sync msctf to wine 1.1.40

svn path=/trunk/; revision=45982
2010-03-07 09:48:42 +00:00
Christoph von Wittich ec5cdce304 [PSAPI_WINETEST]
sync psapi_winetest to wine 1.1.40

svn path=/trunk/; revision=45980
2010-03-07 09:34:40 +00:00
Christoph von Wittich 6534ce1c51 [ITSS]
sync itss to wine 1.1.40

svn path=/trunk/; revision=45979
2010-03-07 09:32:58 +00:00
Christoph von Wittich 314b9e10be [OBJSEL]
sync objsel to wine 1.1.40

svn path=/trunk/; revision=45978
2010-03-07 09:29:02 +00:00
Christoph von Wittich fbff905ed2 [SHELL32_WINETEST]
sync shell32_winetest to wine 1.1.40

svn path=/trunk/; revision=45977
2010-03-07 07:34:02 +00:00
Christoph von Wittich 2b61353ce2 [USER32_WINETEST]
sync user32_winetest to wine 1.1.40

svn path=/trunk/; revision=45976
2010-03-07 07:32:14 +00:00
Christoph von Wittich 08898832d7 [GDI32_WINETEST]
sync gdi32_winetest to wine 1.1.40

svn path=/trunk/; revision=45975
2010-03-07 07:29:40 +00:00
Christoph von Wittich 8bae50b033 [ADVAPI32_WINETEST]
sync advapi32_winetest to wine 1.1.40

svn path=/trunk/; revision=45974
2010-03-07 07:27:57 +00:00
Sylvain Petreolle 8cc8a06a88 Stubplement WTSQueryUserToken.
Patch by Olaf Siejka.


svn path=/trunk/; revision=45969
2010-03-06 23:14:36 +00:00
Sylvain Petreolle 8eca3e0dcd Make the shutdown with ACPI enabled actually work.
Patch by Samuel Serapion.

svn path=/trunk/; revision=45967
2010-03-06 22:22:28 +00:00
Matthias Kupfer 77013ae0dd - fix palette index for the progress bar
svn path=/trunk/; revision=45966
2010-03-06 22:14:46 +00:00