Commit graph

63172 commits

Author SHA1 Message Date
Thomas Faber f0aeab590d [FUSION]
- Add missing psdk dependency to fusion_common

svn path=/trunk/; revision=68853
2015-08-29 07:41:52 +00:00
Thomas Faber f917e6193e [NTOS:EX]
- Remove superfluous dereference in NtCreateProfile
- Allocate the right size for KPROFILE object
- Don't leak the KPROFILE when deleting an EPROFILE
- Avoid some casts
CORE-10066

svn path=/trunk/; revision=68852
2015-08-29 07:35:59 +00:00
Hermès Bélusca-Maïto dd088b28fc [NTOS]
Implement the WinDBG Debugger Worker Thread, which is created inside a target process whenever one uses the ".process /i <addr>" (invasive debugging) command using WinDBG in kernel-mode debugging.
See https://www.microsoftpressstore.com/articles/article.aspx?p=2201303&seqNum=2 section "Switching the Current Process Context" (from the book "Inside Windows Debugging" by Tarik Soulami, pp.101-102) for more details.
The names of the variables must be kept as they are, because WinDBG (more exactly, dbgeng.dll) searches for them within the kernel symbols and retrieves their addresses (since those variables are not publicly exported).

svn path=/trunk/; revision=68851
2015-08-29 02:03:56 +00:00
Hermès Bélusca-Maïto a0a1967e8e [NTDLL]
Make its version information compatible with the one of NTOSKRNL (and accessorily its resource file). Addendum to r25937.

svn path=/trunk/; revision=68850
2015-08-29 01:56:11 +00:00
Giannis Adamopoulos c932cb9d3a [SHELL32]
- Only return the flags that the caller asked for in SHELL32_GetFSItemAttributes. Allows us to get rid of a hell lot of calls to CFSFolder::BindToChild which lead to many calls to FindFirstFile.

svn path=/trunk/; revision=68849
2015-08-28 15:08:19 +00:00
Hermès Bélusca-Maïto a39b4f51b9 [NTOS]
Fix x64 compilation:
- Some KDBG symbols for win32k debugging are defined only in x86 platform when _WINKD_ is disabled.
- KdSetOwedBreakpoints is defined only if _WINKD_ is enabled, addendum for x64 to r68842.

svn path=/trunk/; revision=68848
2015-08-28 14:01:58 +00:00
Thomas Faber 5ff109f0b3 [CMD]
- Avoid statically importing FindFirstStreamW/FindNextStreamW so that our cmd.exe can work on WinXP.
- Accept lowercase /r switch

svn path=/trunk/; revision=68847
2015-08-28 11:39:45 +00:00
Thomas Faber 4e5f69d4d1 [CMD]
- In DirList, initialize stInfo.ptrHead of the dummy node to avoid invalid memory access. Fixes regression in cmd:batch

svn path=/trunk/; revision=68846
2015-08-28 10:51:10 +00:00
Giannis Adamopoulos 2f9a846dcf [SHELL32]
- Sync control.c from wine and disable a large part of it that is not needed. Also update the definition of CPlApplet to match wine.
- Make CControlPanel use the new definition of CPlApplet which lets us simplify loading the applets.
- Make CControlPanel to only use unicode and use the new helper functions.
- Simplify the code for the context menu of cpl items.

svn path=/trunk/; revision=68845
2015-08-28 10:36:35 +00:00
Giannis Adamopoulos 73a3fd8b3c [SHELLUTILS]
- Add a helper function SHSetStrRet that will simplify setting the contents of a STRRET.

svn path=/trunk/; revision=68844
2015-08-28 10:32:02 +00:00
Amine Khaldi e950972731 [CMAKE] Fix broken PCH handling since r67483.
svn path=/trunk/; revision=68843
2015-08-28 09:24:39 +00:00
Pierre Schweitzer 5777e8100c [NTOSKRNL]
Fix build

svn path=/trunk/; revision=68842
2015-08-28 06:19:31 +00:00
Hermès Bélusca-Maïto a7d4979a10 [NTOS:KD]
- Fix the condition check when setting twice (or more) the same breakpoint.
- Implement support for deferred breakpoints. For more information, see: http://www.osronline.com/article.cfm?article=541 (which also exposes an interesting problem about them).

svn path=/trunk/; revision=68841
2015-08-28 03:03:26 +00:00
Amine Khaldi 17228d9d3e [CMAKE] Introduce a way to use auto generation using bison and flex. Dedicated to Eric Kohl. CORE-10055
svn path=/trunk/; revision=68840
2015-08-27 23:00:49 +00:00
Amine Khaldi 6c6dae8b30 [CMAKE] Add and use baseaddress_msvc.cmake.
svn path=/trunk/; revision=68839
2015-08-27 22:35:06 +00:00
Amine Khaldi a9a2119c0c [CMAKE] Update baseaddress.cmake.
svn path=/trunk/; revision=68838
2015-08-27 22:33:07 +00:00
Pierre Schweitzer 78128d23f0 [NTFS]
Return proper status

svn path=/trunk/; revision=68836
2015-08-27 21:02:52 +00:00
Pierre Schweitzer b3ec3aeb5a [NTFS]
It seems that our disk.sys returns "unknown" media type when performing IOCTL_DISK_GET_DRIVE_GEOMETRY on an extended partition.
Not sure how Windows handles this (if any volunteer for a test :-)), in the meantime, forcibly sector size to 512B to allow NTFS driver opening volumes on extended partitions 

svn path=/trunk/; revision=68835
2015-08-27 20:56:08 +00:00
David Quintana ed7c0959c6 [SHELL32]
The desktop.ini file is only meant to be read if the folder has the R (read-only) or S (system) attributes. 
If this causes your favorite folder to stop showing the icon, use "attrib +r <foldername>" or edit it from the properties dialog.
When we add the desktop.ini files, we will also need to add the R attribute to their respective folders.
Followup to CORE-9002

svn path=/trunk/; revision=68834
2015-08-27 16:37:13 +00:00
David Quintana 4b901b355e [NTOBJSHEX]
* Fix comment headers.

svn path=/trunk/; revision=68833
2015-08-26 23:35:38 +00:00
David Quintana 73a55f80e1 [NTOBJSHEX]
* Now that we use lazy enumeration instead of keeping a full list of all items, I was able to simplify a few things.

svn path=/trunk/; revision=68832
2015-08-26 23:30:47 +00:00
Hermès Bélusca-Maïto 18183f23d3 [DISKPART]
- Russian translation update by tower.
- Fixup the other translations.

svn path=/trunk/; revision=68831
2015-08-26 22:53:20 +00:00
Pierre Schweitzer 81ce5cdc50 [NTFS]
Fix two memory leaks

svn path=/trunk/; revision=68830
2015-08-26 18:55:53 +00:00
Pierre Schweitzer 74ed7ffd30 [NTFS]
Totally rewrite the way MFT records attributes are handled.
Up to now, we were having really similar loops, only looking at the resident part of the attribute list, not really caring about how the loop was going.

This was leading to some issues:
- In case the attribute we were looking for was stored in the non-resident part of the attribute list, we would miss it (excepted in the case of FindAttribute() which was properly browsing the whole attribute list).
- In the specific case of FindAttribute(), one would have been able to setup a broken MFT record with the resident attribute list pointing on the non resident attribute list which itself would point to the resident attribute list. In such case, the driver would loop forever caught on the loop, allocating tones of memory. It was possible to trigger this by user space, from a non-privileged user, just by browsing the right directory entry.
- In the case of the other loops (non FindAttribute()), another issue (other than missing attributes) was present, one would have been able to setup a broken MFT record with an attribute of null-length. This would have caused the driver to loop forever on the attribute list. This could be triggered from usermode too. And could be triggered by a non-privileged user.

This commit introduces a new set of functions for attributes browsing: FindFirstAttribute(), FindNextAttribute(), FindCloseAttribute(). It allows safely browsing attributes and handles broken cases. It also performs reading of the attribute list when present and makes sure there's only one read. This method should be the only one to use to browse the attributes.
The whole NTFS code base has been converted to use this newly set of functions. This really simplifies the implementation of FindAttribute(), and prevent unsafe code duplication.

CORE-10037 #resolve #comment Fixed with r68829

svn path=/trunk/; revision=68829
2015-08-26 18:20:04 +00:00
David Quintana b4e29c9de9 [SHELL32]
* Fix loading icon info from dekstop.ini. Also took the chance to remove some unnecessary convolution. The old code tried to load the info, but didn't actually make use of the returned string at all.
CORE-9002 #resolve #comment Icon loading should work now. Adding the default desktop.ini files in the right folders will be a followup issue.

svn path=/trunk/; revision=68828
2015-08-26 17:31:42 +00:00
Hermès Bélusca-Maïto be6a6195b6 [NTVDM]
- Towards a complete fix of VGA console attach/detach: a lot of progress is made but few little things need to be checked/adjusted.
- Fix text scroll (at least in text modes) by doing guest-to-guest moves, using the EmulatorCopyMemory function introduced in r68826.
- Fix the computation of the screen rows/columns values stored in the BDA, in graphics modes (in addition to the change of r68090), by dividing the graphics resolution by the character heights & widths. Correct values are indeed needed by some programs, eg. QBasic (I also add a CharacterWidth; normally it should be computable using the CRTC registers, and is always == 8 or 9, but still...).

svn path=/trunk/; revision=68827
2015-08-26 01:26:33 +00:00
Hermès Bélusca-Maïto 91a6866265 [NTVDM]
Introduce a function for doing guest-to-guest memory copies (given here in a temporary implementation until a proper one is developed). It will be used in my next commit.

svn path=/trunk/; revision=68826
2015-08-26 00:37:50 +00:00
Daniel Reimer 3836b30b50 [CMD]
Update German translation by ... ME

svn path=/trunk/; revision=68825
2015-08-25 21:19:30 +00:00
Pierre Schweitzer ec2336a4a6 [CMD]
Remove an useless if

svn path=/trunk/; revision=68824
2015-08-25 20:39:53 +00:00
Pierre Schweitzer 6686b09385 [CMD]
Implement switch /R for dir command.
It allows enumerating alternate data streams of files

Commit dedicated to Ged

svn path=/trunk/; revision=68823
2015-08-25 20:35:51 +00:00
Pierre Schweitzer b72e356c87 [NTFS]
Properly set StreamNameLength (with the length of extra data we append).
This fixes truncated output from FindFirstStreamW/FindNextStreamW

svn path=/trunk/; revision=68822
2015-08-25 20:11:53 +00:00
Benedikt Freisen 51d24b7385 Some fixes to the scf file registry entry; added some missing entries (patch by gonzoMD)
svn path=/trunk/; revision=68821
2015-08-25 14:24:41 +00:00
Benedikt Freisen 3227d6fa06 [PSDK] Add methods to Gdiplus::Color
svn path=/trunk/; revision=68820
2015-08-25 14:13:19 +00:00
Hermès Bélusca-Maïto 5cab971ae1 [NTVDM]: Initialize the correct buffer! (aka. fix confusion between ConsoleFramebuffer and Graphics Framebuffer; fixes text -> graphic transitions). Addendum for r68812
svn path=/trunk/; revision=68819
2015-08-25 12:46:40 +00:00
Hermès Bélusca-Maïto c199fcbca2 [SHELL32]: Add the trailing '...' after the "Run as" command in order to indicate more information is needed before performing the action.
CORE-10039 #comment '...' added in r68818.

svn path=/trunk/; revision=68818
2015-08-25 12:18:32 +00:00
Hermès Bélusca-Maïto d2cfc5d13b [FREELDR]: Fix typo in comment, spotted by "middings". CORE-10040 #resolve
svn path=/trunk/; revision=68817
2015-08-25 11:55:36 +00:00
Hermès Bélusca-Maïto 7710f1ed1c [NTVDM]: Correctly set last (and returned) errors when we fail at reallocating a memory block (in case this is the last block), or if the block is invalid. Do the same stuff also for few other memory functions.
svn path=/trunk/; revision=68816
2015-08-25 01:48:17 +00:00
Aleksandar Andrejevic 7b30b216d0 [FAST486]
If FAST486_PREFIX_SEG is set, we're supposed to use the override segment
instead of DS, and not the other way around.


svn path=/trunk/; revision=68815
2015-08-24 20:55:09 +00:00
Pierre Schweitzer 50f5e804a9 [NTFS]
Remove leftover code

svn path=/trunk/; revision=68814
2015-08-24 20:40:54 +00:00
Hermès Bélusca-Maïto cc75f78b89 Replace LPVOID by PVOID everywhere!
svn path=/trunk/; revision=68813
2015-08-24 19:02:07 +00:00
Hermès Bélusca-Maïto 5273c39a14 [NTVDM]
- Correctly sync ConsoleFramebuffer when we attach/detach VGA from the console (fix memory corruptions introduced by r68720).
- Fix few comments in the process.

svn path=/trunk/; revision=68812
2015-08-24 19:00:27 +00:00
Pierre Schweitzer 8b651ad6d9 [NTFS]
Support full data stream name on open (i.e., stream name finished with :$DATA)

svn path=/trunk/; revision=68811
2015-08-24 09:52:30 +00:00
Pierre Schweitzer 5f9af4a19f [NTFS]
Fix returned status code, spotted by Thomas 

svn path=/trunk/; revision=68810
2015-08-24 08:45:28 +00:00
Pierre Schweitzer e9ae3cdf25 [NTFS]
Return properly formatted stream names, according to: https://msdn.microsoft.com/en-us/library/cc232090.aspx

svn path=/trunk/; revision=68809
2015-08-24 08:43:26 +00:00
Pierre Schweitzer 6f4dfe4e09 [NTFS]
Implement FileStreamInformation class for IRP_MJ_QUERY_INFORMATION.
It allows enumerating streams for a given file

svn path=/trunk/; revision=68808
2015-08-24 08:36:58 +00:00
Hermès Bélusca-Maïto 57c8922ec2 Fix few comments, no code changes.
svn path=/trunk/; revision=68807
2015-08-24 01:42:52 +00:00
Hermès Bélusca-Maïto ef41fe2284 [KERNEL32]
- Move some #defines where they belong; use ARRAYSIZE(...) macro where appropriate.
- Use enumeration for the environment name types.
- Fix BaseCreateVDMEnvironment so that we only convert the paths of TEMP/TMP, PATH, WINDIR and SYSTEMROOT env values to their short form, as done on Windows. To that purpose use the BaseGetEnvNameType_U helper.
- Fix the loop that computed the needed new environment size.
Needed for CORE-9773.

svn path=/trunk/; revision=68806
2015-08-24 01:32:00 +00:00
Pierre Schweitzer 87620d75ba [HACKSSIGN]
Fix typo, spotted by "Michele MZ Ji"

CORE-10033

svn path=/trunk/; revision=68805
2015-08-23 17:33:15 +00:00
Eric Kohl 82e230b0d9 [WLNOTIFY]
- Disable the debug output.
- Add and register the missing notification functions.

svn path=/trunk/; revision=68804
2015-08-23 15:58:18 +00:00
Eric Kohl f28d52abfc [WINLOGON]
Implement calls to the notification DLLs.

svn path=/trunk/; revision=68803
2015-08-23 15:48:52 +00:00