Commit graph

561 commits

Author SHA1 Message Date
Hermès Bélusca-Maïto 9060b0cb7a
Fix build (forgot a comma ;) 2019-06-11 22:36:10 +02:00
Hermès Bélusca-Maïto 41e7c818d1
[NTOS] IoSetHardErrorOrVerifyDevice(): Check whether the IRP is not associated with any thread. 2019-06-11 22:29:34 +02:00
Pierre Schweitzer f6eb13a969
[NTOSKRNL] Rework ObpDeleteSymbolicLinkName and ObpCreateSymbolicLinkName
So that they handle LUID mappings and process device maps.

Get rid of the ObpParseSymbolicLinkToIoDeviceObject helper and introduce a
new helper ObpProcessDosDeviceSymbolicLink that will do the same things
but also handle name creation/deletion as well as device map handling.
All this is based on previous code (hence the same comments :-)).

What's left to do now is to add support for device maps in ObpLookupObjectName
2019-06-11 21:21:52 +02:00
Pierre Schweitzer 33604e0147
[NTOSKRNL] Fix ObpLUIDDeviceMapsEnabled initialization 2019-06-10 21:17:21 +02:00
Pierre Schweitzer 651ba03c6d
[NTOSKRNL] Taggify some allocs 2019-06-10 14:54:55 +02:00
Pierre Schweitzer a5daa8894d
[NTOSKRNL] Implement SepCleanupLUIDDeviceMapDirectory
This will clean up all the links (drive letters) created
by an user on session deletion once LUID device maps are
in use
2019-06-10 14:49:50 +02:00
Pierre Schweitzer 5ecc05003d
[NTOSKRNL] On session last reference removal, dereference LUID device map 2019-06-10 12:30:49 +02:00
Pierre Schweitzer ad80715b1a
[NTOSKRNL] Implement NtSetInformationProcess:ProcessDeviceMap 2019-06-10 10:35:24 +02:00
Eric Kohl 8319c73e2e [NTOS:IO] Implement the PlugPlayControl.PlugPlayControlEnumerateDevice request
Drivers for Intel Pro/1000 NICs seem to install properly.
2019-06-08 20:42:38 +02:00
Serge Gautherie cf27695269 [NTOS:MM] PeFmtCreateSection(): Improve AMD64 image failure case
Addendum to 98638cc2df.

CORE-15981
2019-06-04 18:22:19 +02:00
Pierre Schweitzer fd4752450f
[NTOSKRNL] Add support for global DOS directory in ObpLookupEntryDirectory
If any exists, we'll loop over in that directory, trying to find the object
2019-06-02 21:46:35 +02:00
Pierre Schweitzer 9c3c0d123b
[NTOSKRNL] In case IopMountVolume call is a success, return its VPB
This fixes an extra (erroneous) reference being set on the VPB.

Based on a patch by Vadim Galyant

CORE-16080
2019-06-02 10:48:35 +02:00
Pierre Schweitzer f8a4d31da4
[NTOSKRNL] On process primary token change, dereference device map 2019-06-02 10:00:17 +02:00
Pierre Schweitzer de17b36037
[NTOSKRNL] Implement ObSetDirectoryDeviceMap 2019-06-01 21:22:30 +02:00
Pierre Schweitzer 7c618faa32
[NTOSKRNL] Implement SeGetLogonIdDeviceMap 2019-06-01 21:09:20 +02:00
Pierre Schweitzer 4bf7d54910
[NTOSKRNL] Implement ObpSetCurrentProcessDeviceMap 2019-06-01 18:58:36 +02:00
Pierre Schweitzer 57c6086806
[NTOSKRNL] Implement ObpReferenceDeviceMap() 2019-06-01 18:43:38 +02:00
Pierre Schweitzer 59806f7eb0
[NTOSKRNL] Stub SeGetLogonIdDeviceMap 2019-06-01 18:37:47 +02:00
Pierre Schweitzer 445e895932
[NTOSKRNL] Simplify NtQueryInformationProcess:ProcessDeviceMap implementation 2019-06-01 17:40:23 +02:00
Pierre Schweitzer 46b90ccb96
[NTOSKRNL] Add support for LUID mappings in ObQueryDeviceMapInformation 2019-06-01 17:40:18 +02:00
Pierre Schweitzer 1074a9aaff
[NTOSKRNL] Implement support for PROCESS_DEVICEMAP_INFORMATION_EX in NtQueryInformationProcess 2019-06-01 15:18:52 +02:00
Pierre Schweitzer b16a07fa69
[NTOSKRNL] Implement ObIsLUIDDeviceMapsEnabled and call it in NtQueryInformationProcess 2019-06-01 14:56:28 +02:00
Pierre Schweitzer 7898b2eaa3
[NTOSKRNL] Disable LUID mapping until it's properly implemented 2019-06-01 14:40:54 +02:00
Pierre Schweitzer 848f7bb687
[NTOSKRNL] On device map freeing, make directory object temporary again 2019-06-01 13:59:13 +02:00
Pierre Schweitzer 221ed88141
[NTOSKRNL] De-duplicate code between Ob(f)DereferenceDeviceMap functions 2019-06-01 13:54:34 +02:00
Pierre Schweitzer 1b42731dca
[NTOSKRNL] Add a few ASSERTs to ObpGetDosDevicesProtection for DBG builds 2019-06-01 13:51:40 +02:00
Pierre Schweitzer 8f655f9466
[NTOSKRNL] Implement ObpFreeDosDevicesProtection to free DACL 2019-06-01 13:44:55 +02:00
Pierre Schweitzer 933dddeb07
[NTOSKRNL] Modify ObpCreateDeviceMap so that it can handle any process
It is now able to set the newly created device map to any
process and will default to current process if none is provided.
It also sets system device map if no process is specified.
It also deferences existing device map in the process if needed.
Finaly, it will make the directory object permanant.
2019-06-01 13:35:41 +02:00
Hervé Poussineau e5bffe49da [NTOS:KDBG] Use CONTEXT instead of KTRAP_FRAME
Change KdbpTrapFrameToKdbTrapFrame to prefer CONTEXT (if available) over
KTRAP_FRAME.
2019-05-23 11:04:40 +02:00
Hervé Poussineau f7ec84eea0 [NTOS:KD] Remove some _WINDK_ usages
- Always include kd64.h
- Change KdpPrompt() prototype to be compatible between KDBG and _WINDK_
- Rename KdComponentTable to KdpComponentTable to prevent a conflict
- Add some functions stubs and global variables
2019-05-23 11:04:40 +02:00
Hervé Poussineau f5e962ff2e [NTOS:KD] Remove dead code 2019-05-23 11:04:40 +02:00
Hervé Poussineau 95d5b39b57 [NTOS:KD] Remove CTRL+C pending support left over, likely broken by 5a6adb4f13 2019-05-23 11:04:40 +02:00
Hervé Poussineau f6cec6d5cb [NTOS:KD] Remove /BREAK support left over, likely broken by 819a0ed90a 2019-05-23 11:04:40 +02:00
Pierre Schweitzer fe6c7f05e2
[NTOSKRNL] Use the security descriptor for all the symlinks 2019-05-21 19:28:17 +02:00
Pierre Schweitzer 95d303bf13
[NTOSKRNL] Simplify ObpCreateGlobalDosDevicesSD by using a SD on the stack
Rename it to ObpGetDosDevicesProtection to reflect the two previous changes:
its purpose is to return a DACL matching protection mode
2019-05-21 19:28:16 +02:00
Pierre Schweitzer 33f524c625
[NTOSKRNL] Use relaxed ACLs in ObpCreateGlobalDosDevicesSD when protection mode is not set 2019-05-21 19:28:16 +02:00
Pierre Schweitzer 1c4e44592c
[NTOSKRNL] Save ProtectionMode value on boot 2019-05-21 19:28:16 +02:00
Pierre Schweitzer f821e1742c
[NTOSKRNL] Implement NtQuerySystemInformation(SystemObjectSecurityMode) 2019-05-18 10:37:25 +02:00
Pierre Schweitzer a33a69b3f4
[NTOSKRNL] Save ObjectSecurityMode value on boot 2019-05-18 10:37:24 +02:00
Mark Jansen 98638cc2df
[NTOS/MM] Recognize AMD64 image in PeFmtCreateSection failure case 2019-05-15 19:39:56 +02:00
Thomas Faber f86360fdbc
[NTOS:CM] Do not call ZwQueryObject with a zero-size buffer. CORE-15882
Actually fixes ntdll_apitest:NtLoadUnloadKey.
2019-05-07 13:52:50 +02:00
Thomas Faber d3fa3b0ca2
[NTOS:CM] Check for correct status from ZwQueryObject. CORE-15882
Fixes regression in ntdll_apitest:NtLoadUnloadKey from d570482bc7.
2019-05-05 17:57:12 +02:00
Thomas Faber 5706f6e9f4
[NTOS:PNP] Reduce the size of the pool buffer in IopGetParentIdPrefix. CORE-15882 2019-05-05 10:39:29 +02:00
Thomas Faber 2f1fab41fa
[NTOS:CM] Reduce the size of some unnecessarily large stack buffers. CORE-15882 2019-05-05 10:39:26 +02:00
Thomas Faber 047a3bf79a
[NTOS:CM] Simplify CmpGetRegistryPath to avoid unnecessary stack buffers. CORE-15882 2019-05-05 10:39:22 +02:00
Thomas Faber d570482bc7
[NTOS:CM] Avoid a fixed-length stack buffer in CmpCmdHiveOpen. CORE-15882 2019-05-05 10:39:18 +02:00
Thomas Faber 26ab9f8a03
[NTOS:CM] Avoid a fixed-length stack buffer in CmpAddToHiveFileList. CORE-15882 2019-05-05 10:39:14 +02:00
Thomas Faber f3a280f52b
[NTOS] Use correct buffer size when calling MiResolveImageReferences. CORE-15882 2019-05-05 10:39:11 +02:00
Thomas Faber ccb91bebbe
[NTOS:PNP] Avoid a fixed-length stack buffer in IopActionConfigureChildServices. CORE-15882 2019-05-05 10:39:07 +02:00
Thomas Faber e1b20681f5
[NTOS:IO] Avoid a fixed-length buffer in IopGetDriverObject. CORE-15882 2019-05-05 10:39:01 +02:00