Commit graph

21550 commits

Author SHA1 Message Date
Alex Ionescu 59c6a927a2 - CT_ACTIVE_IMPERSTIONATION_INFO_BIT -> CT_ACTIVE_IMPERSONATION_INFO_BIT
- Added Process and Thread locking inlined functions for Ps Security functions.
- Thread safety is your friend! Huge rework of almost all the functions in ps/security.c to use the process/thread pushlocks and use interlocked operations when dealing with the ActiveImpersonationInfo thread flag.
- Added PAGED_CODE().
- Added checks for Processes with Jobs for the day that will happen.
- PsAssignImpersoonationToken with a NULL token handle means simply to revert to self.
- Don't ignore the HandleAttributes in NtOpenProcessTokenEx.
- Use SeTokenType to make sure the token passed is an impersonation token.
- Remove some fixed bugs in krnlfun.c, add more TODOs.

svn path=/trunk/; revision=23231
2006-07-22 22:57:42 +00:00
Klemens Friedl 0cc0655c20 Add software patent setting to build config template.
Implement the setting in freetype2 (rbuild file).

svn path=/trunk/; revision=23230
2006-07-22 19:38:18 +00:00
Alex Ionescu 7af4849812 - Implement KiRecalculateDueTime to handle cases where a timeout wait has been interupted by an APC or alerted, and it needs to be recalculated in the relative case. (This fixes the "contact alex" bugcheck).
svn path=/trunk/; revision=23229
2006-07-22 17:19:09 +00:00
Brandon Turner d310e2ae8c Fix typo.
svn path=/trunk/; revision=23228
2006-07-22 17:03:00 +00:00
Brandon Turner 25b81049eb Partially implement:
NtUserCallHwndOpt
NtUserGetThreadState
Implement
GetProgmanWindow
GetTaskmanWindow
This is (kinda)part of bug 1668

svn path=/trunk/; revision=23227
2006-07-22 16:50:23 +00:00
Alex Ionescu db04986dce - Give winlogon SE_ASSIGNPRIMARYTOKEN_PRIVILEGE because it was lacking it and would fail under this kernel patch.
- PspAssignPrimaryToken was good enough for actually *assigning* the token, but when NtSetInfoProcess is called with ProcessPrimaryToken, we want to do a lot more then just randomly assigning it. Added PspSetPrimaryToken which first verifies if the token being assigned is a child token and if not, checks for SeAssignPrimaryTokenPrivilege. Also added a fixme for more code that's needed, to actually re-calculate the process's granted access towards itself. Also added thread-safety.

svn path=/trunk/; revision=23226
2006-07-22 16:03:12 +00:00
Eric Kohl e553dd4145 Implement CM_Get_Next_Log_Conf[_Ex] and add PNP_GetNextLogConf stub.
svn path=/trunk/; revision=23225
2006-07-22 14:45:14 +00:00
James Tabor 7f907bd0ac Fix for TrackMouseEvent by Dmitry Timoshkov, wine port.
svn path=/trunk/; revision=23224
2006-07-22 07:04:44 +00:00
Brandon Turner 1c87e124a6 you can thank me later jim ;)
svn path=/trunk/; revision=23223
2006-07-22 05:50:06 +00:00
James Tabor db1b46702a Put back revision 23192
svn path=/trunk/; revision=23222
2006-07-22 05:37:33 +00:00
James Tabor 07b6ddc2b6 -Part 1
-Win32k and User32
  - Menu.c: Made set menu items selective masking. Setting masks fixed the garbage going into the item structure. Now right justify menu bar works. There are some more cosmetic issues left to do. I have those ready next week or so. Running wine menu test fail due to exception in kernel32 IsBadStringPtrA&W isbad.c. Funny? Does PSEH work in user mode? The string test is needed. Misc fixed, some restructuring and Wine ports. Please let me know if it breaks something.

svn path=/trunk/; revision=23221
2006-07-22 05:28:44 +00:00
Brandon Turner 4a6251c297 Revert my backspace patch from before. I found a better way to handle backspaces which doesnt break backspacing in ftp.exe(and some of apps) while still fixing ncftp.exe.
svn path=/trunk/; revision=23220
2006-07-22 05:16:26 +00:00
Hervé Poussineau c1d9e2bb6c Get rid of TCHAR variables. Use WCHAR instead.
svn path=/trunk/; revision=23219
2006-07-21 22:15:21 +00:00
Brandon Turner a6bd824e02 Fix the horribly broken SetProgramWindow implementation
svn path=/trunk/; revision=23218
2006-07-21 21:11:46 +00:00
Alex Ionescu da390966cc - Add bugcheck CRITICAL_OBJECT_TERMINATED
- Implement PspCatchCriticalBreak and fix the 5 or so FIXMEs that depended on it.

svn path=/trunk/; revision=23216
2006-07-21 19:59:16 +00:00
Hervé Poussineau 4dfbe6ea8c Add a hack to be able to use serial mice again (IRP_MJ_CLOSE is not set after IoGetDeviceObjectPointer() + ObDereferenceObject())
svn path=/trunk/; revision=23215
2006-07-21 19:49:32 +00:00
Alex Ionescu 2f2139d851 - Implement Kernel, Memory Manager and Process Manager APIs for the following concepts (not yet used):
- Process Quantum.
  - Fixed and Variable Quantum Tables.
  - Long and Short Quantum Variability.
  - Priority Separation and Separation Masks.
  - Foreground Quantum Table.
  - Process Priority, Priority Modes and Priority Classes.
  - Virtual Memory Priority
  - Job Scheduling Classes
- Implement PsSetProcessPriorityByClass.

svn path=/trunk/; revision=23214
2006-07-21 19:28:38 +00:00
Hervé Poussineau 3ea8db48b1 Fix regression introduced in r23174, which prevented autochk to work
svn path=/trunk/; revision=23212
2006-07-21 19:00:28 +00:00
The Wine Synchronizer 9924c52e90 Autosyncing with Wine HEAD
svn path=/trunk/; revision=23211
2006-07-21 13:07:57 +00:00
The Wine Synchronizer fb4c0e59ed Autosyncing with Wine HEAD
svn path=/trunk/; revision=23210
2006-07-21 13:07:51 +00:00
The Wine Synchronizer 6c0bd6bc60 Autosyncing with Wine HEAD
svn path=/trunk/; revision=23209
2006-07-21 13:05:13 +00:00
The Wine Synchronizer d2f18185df Autosyncing with Wine HEAD
svn path=/trunk/; revision=23208
2006-07-21 13:05:07 +00:00
The Wine Synchronizer 9046d40509 Autosyncing with Wine HEAD
svn path=/trunk/; revision=23207
2006-07-21 13:05:00 +00:00
The Wine Synchronizer 5a5dc9a1c4 Autosyncing with Wine HEAD
svn path=/trunk/; revision=23206
2006-07-21 13:04:55 +00:00
The Wine Synchronizer e1450f1b74 Autosyncing with Wine HEAD
svn path=/trunk/; revision=23205
2006-07-21 13:04:49 +00:00
Aleksey Bragin c280f26aa5 Update autosyncing status of Wine-shared DLLs
svn path=/trunk/; revision=23204
2006-07-21 12:49:46 +00:00
The Wine Synchronizer b82b5be98b Autosyncing with Wine HEAD
svn path=/trunk/; revision=23203
2006-07-21 11:30:20 +00:00
The Wine Synchronizer 4a1626a594 Autosyncing with Wine HEAD
svn path=/trunk/; revision=23202
2006-07-21 11:20:23 +00:00
The Wine Synchronizer fb9067d427 Autosyncing with Wine HEAD
svn path=/trunk/; revision=23201
2006-07-21 11:13:18 +00:00
Magnus Olsen 74739f95d9 patch from LMH1 : Bug#: 1675 : Norwegian translation
svn path=/trunk/; revision=23200
2006-07-21 10:23:55 +00:00
Alex Ionescu 0355e26a86 - Use safe referencing.
- Fix a bug in PsGetNextProcess(Thread) since we now use safe referencing and the lookup loop can continue.

svn path=/trunk/; revision=23199
2006-07-20 18:47:35 +00:00
Alex Ionescu 5da6c3508f - Refactor NtSuspend/ResumeThread into PsSuspend/ResumeThread.
- Implement NtSuspend/ResumeProcess with PsSuspend/ResumeProcess.
- Improve the previous code to use rundown protection and be thread-safe.

svn path=/trunk/; revision=23198
2006-07-20 18:29:54 +00:00
Alex Ionescu e9600e4c9c - Add Pushlock support for GCC (Thanks Thomas!)
- Remove a bunch of deprecated crap from ps.h
- Get rid of PsLockProcess, PsUnlockProcess. Use the process pushlock instead.
- When assigning the job, only acquiring rundown protection is enough.
- Use interlocked intrinsics for setting the ExceptionPort instead of locking the entire process object.
- Disable locking in ProcessSessionInformation for NtSetInformationProcess. The whole API seems wrong anyway, on my XP machine calling it does not change the session or change any token data. To verify later...

svn path=/trunk/; revision=23197
2006-07-20 17:44:30 +00:00
Michele Cicciotti 82aa6e1250 Too many changes to list here! just see screenshot: http://img352.imageshack.us/my.php?image=socloseta2.png (not pictured: artifacts due to sometimes-broken handling of window region refreshing)
The graphics, mouse and keyboard are virtually done. Mouse wheel works. Still some bugs in the handling of binary raster operation codes, but less than before. Fixed polyline. Fixed all cursor issues. Fully supports text output. Fixed a resource leak where all clipping region were slowly leaked. Now closes cleanly on server disconnect

Moving on to more fun things!

Many thanks to filip & WaxDragon for the code of the previous Win32 port, it was misleading at times but very useful overall!

svn path=/trunk/; revision=23196
2006-07-20 17:11:00 +00:00
Alex Ionescu 40a3a52a7b - Add some final missing annotations to kill.c
[AUDIT]
 - Most of the functions are documented at length in Windows Internals II and at a more high-level fashion in Windows Internals 4 and were based on that information. Undocumented routines were based of the operations done in the documented ones (for example, freeing buffers that we know were allocated, etc).

svn path=/trunk/; revision=23195
2006-07-20 16:30:07 +00:00
Alex Ionescu a92681004e - Move a bunch of externs to ps.h and delete many dupped/tripped ones.
- Change FAST_MUTEX PsActiveProcessMutex to KGUARDED_MUTEX.
- Define PS Flags and use them, isntead of magic numbers. (For magic mushrooms, you'll have to wait a while, these aren't implemented yet).

svn path=/trunk/; revision=23194
2006-07-20 16:26:10 +00:00
Alex Ionescu a74eda7fe8 - Fix Win32K thread rundown bug, fixes shutdown crash and other bugchecks where some ASSERT(Class->windows) wasn't 0.
- Close the right debug handle instead of some random value.
- Some generic formatting cleanup.

svn path=/trunk/; revision=23193
2006-07-20 15:46:10 +00:00
Alex Ionescu 502215cb1c - Simplify PsGetNextProcess so it works like PsGetNextProcessThread.
- Reformat and annotate parts of process.c
- Remove PsGetWin32Process, PsGetWin32Thread and implement/export the real functions PsGetCurrentProcessWin32Process, PsGetCurrentThreadWin32Thread, change win32k to use them.
- Initailize and use process rundown.
- Set corrent GrantedAccess.
- Remove an extra incorrect reference we were adding to processes.
- Implement PsIsProcessBeingDebugged.
- Make the same changes to NtOpenProcess that we did previously to NtOpenThread.

svn path=/trunk/; revision=23192
2006-07-20 14:53:47 +00:00
Aleksey Bragin 18726a1fac Spaces -> TABs, no contents change
svn path=/trunk/; revision=23191
2006-07-20 09:32:50 +00:00
Magnus Olsen e0377113db start spliting up my code. I been writing
1. DD_CALLBACKS code writen by me have been move to dd.c 

2. follow DD_CALLBACKS api is working as they should 
   NtGdiDdWaitForVerticalBlank, NtGdiDdCanCreateSurface, NtGdiDdGetScanLine

3. follow api does not working as it should, is it gdi32 problem or win32k problem for it ?
   NtGdiDdCreateSurface

4. Start rewriten surf callback and cleanup some code 
   alot wrong with them.

5. start moving surface callback to ddsurf.c 
 

 

svn path=/trunk/; revision=23189
2006-07-20 07:23:21 +00:00
Hervé Poussineau 7b45b10011 Rename twain32.rbuild to twain_32.rbuild
svn path=/trunk/; revision=23188
2006-07-20 07:09:20 +00:00
Hervé Poussineau 85a4e7f1ba Delete now useless twain directory
svn path=/trunk/; revision=23186
2006-07-20 06:38:33 +00:00
Hervé Poussineau a5440df642 Forgot to commit this file with previous commit ;)
svn path=/trunk/; revision=23185
2006-07-20 06:27:35 +00:00
Hervé Poussineau 19dabc7661 Copy twain directory to twain_32
svn path=/trunk/; revision=23184
2006-07-20 06:26:09 +00:00
Filip Navara 602677e8f5 Fix a bug in RtlMultiByteToUnicodeSize. Credits belong to whoever debugged it.
svn path=/trunk/; revision=23183
2006-07-20 06:25:51 +00:00
Hervé Poussineau 2c1a305f03 Rename twain32.rbuild to twain_32.rbuild
svn path=/trunk/; revision=23182
2006-07-20 06:15:24 +00:00
Alex Ionescu 50f095a47e - Fix for bug 1703. reported by gkrupa.
svn path=/trunk/; revision=23181
2006-07-20 05:39:40 +00:00
Alex Ionescu d4cceffe59 [AUDIT]
- 90% of the functions in this file are 1 line functions which set or get a value from ETHREAD.
 - The other 4 functions are related to User and System Thread Startup APCs, which are documented in gruesome detail and pseudo-code in Windows Internals 4 and Windows Internals II, as well as the main Thread Creation routine (PspCreateThread) which is one of the most well documented internal routines of NT. Code was developped in conjuction with WI4 and WI II.

svn path=/trunk/; revision=23180
2006-07-20 05:37:12 +00:00
Alex Ionescu ed65a3293e - Move ExGetPreviousMode to \ex, it's not a Ps function
- Organize thread.c into private/public functions properly.
- Do another pass of formatting fixes and function annotation.
- Fix a bug in PspSystemStartup.
- Properly hold object references towards a thread that's being created.
- Set the Thread->GrantedAccess value.
- Update NtOpenThread to use an Access State since these work now and Ob respects them, and also add a special hack present on NT: If the SeDEbugPrivilege is present, then the caller will get full thread access regardless of his rights.

svn path=/trunk/; revision=23179
2006-07-20 05:33:03 +00:00
Alex Ionescu 88aac74efb - More kernel fun.
svn path=/trunk/; revision=23178
2006-07-20 03:10:32 +00:00