Commit graph

440 commits

Author SHA1 Message Date
Pierre Schweitzer f4d29a74aa
[NTFS] Don't perform overzealous checks on bitmap while reading a directory
This avoids partial direactory reads where we believe they are corrupted
while they are not.
2018-12-01 21:52:55 +01:00
Pierre Schweitzer 73c06d09ff
[IPHLPAPI_APITEST] CurrPorts seems to confirm that timestamp is really a timestamp 2018-11-28 08:28:37 +01:00
Pierre Schweitzer f718b1d719
[TCPIP] Stubplement returning module information for TCP and UDP connections 2018-11-27 23:12:56 +01:00
Pierre Schweitzer 3028831867
[TCPIP] Save the date when an ADDRESS_FILE is created 2018-11-27 21:36:47 +01:00
Pierre Schweitzer 655e66bdbd
[TCPIP] Define a enum to select which information to return 2018-11-27 21:36:41 +01:00
Pierre Schweitzer ce7f9211a0
[TCPIP] In InfoTdiQueryGetConnectionTcpTable(), only return if there's a connection 2018-11-25 09:32:30 +01:00
Hermès Bélusca-Maïto b77824a375 [FASTFAT] Improvements for volume dismount + minor bugfixing.
- Cache the RootFcb so that its cleanup can be handled separately
  during dismounting.

- Force volume dismount at cleanup if the VCB_DISMOUNT_PENDING flag
  is set.

- Actually dismount a volume if its VCB has been flagged as not good,
  or if we force dismounting.

NOTE: In their *CheckForDismount() function, our 3rd-party FS drivers
as well as MS' fastfat, perform a comparison check of the current VCB's
VPB ReferenceCount with some sort of "dangling"/"residual" open count.
It seems to be related to the fact that the volume root directory as
well as auxiliary data stream(s) are still opened, and only these are
allowed to be opened at that moment. After analysis it appears that for
the ReactOS' fastfat, this number is equal to "3".

- On dismounting, cleanup and destroy the RootFcb, VolumeFcb and the
  FATFileObject. Then cleanup the SpareVPB or the IoVPB members, and
  finish by removing the dismounted volume from the VolumeListEntry
  and cleaning up the notify synchronization object and the resources.

- During dismounting, and on shutdown, flush the volume before
  resetting its dirty bit.

- On shutdown, after volume flushing, try to unmount it without forcing.

- Release the VCB resources only when we actually dismount the volume
  in VfatCheckForDismount().

- Initialize first the notify list and the synchronization object,
  before sending the FSRTL_VOLUME_MOUNT notification.

- If we failed at mounting a volume but its VCB's FATFileObject was
  already initialized, first call CcUninitializeCacheMap() on it
  before dereferencing it.

- Send FSRTL_VOLUME_LOCK, FSRTL_VOLUME_LOCK_FAILED and
  FSRTL_VOLUME_UNLOCK notifications during volume locking (and failure)
  and volume unlocking.

- Flush the volume before locking it, and clean its dirty bit if needed.

NOTE: In addition to checking for VCB_CLEAR_DIRTY, we also check for the
presence of the VCB_IS_DIRTY flag before cleaning up the dirty bit: this
allows us to not re-clean the bit if it has been previously cleaned.
This is needed for instance in this scenario:
- The volume is locked (it gets flushed and the dirty bit is possibly cleared);
- The volume then gets formatted with a completely different FS, that
  possibly clears up the first sector (e.g. BTRFS ignores 1st sector);
- The volume is then dismounted: if we didn't check whether VCB_IS_DIRTY
  was set prior to resetting it, we could attempt clearing it again! But
  now that the volume's filesystem has been completely changed, we would
  then try to modify the dirty bit on an erroneous position on disk!
  That's why it should not be touched in this case during dismounting.
- The volume is unlocked (same comment as above), and later can be
  detected as being BTRFS.
2018-11-25 09:00:40 +01:00
Pierre Schweitzer 0ec92100bc
[TCPIP] Properly display local information for established connections 2018-11-24 22:26:06 +01:00
Pierre Schweitzer 13de7f08af
[TCPIP] Implement enumerating UDP connections with owner PID 2018-11-24 21:41:10 +01:00
Pierre Schweitzer 411504b5f4
[TCPIP] Implement enumerating TCP connections with owner PID 2018-11-24 21:41:09 +01:00
Pierre Schweitzer 935978ee57
[TCPIP] Store creator PID in ADDRESS_FILE 2018-11-24 21:41:09 +01:00
Pierre Schweitzer 91b013d387
[TCPIP] When enumerating sockets, retrieve their state and return it
This fixes netstat not having any state when enumerating connections.
Basically, now, our netstat produces stuff like:
https://twitter.com/HeisSpiter/status/1065871999266955264
2018-11-23 22:51:35 +01:00
Pierre Schweitzer 500a5151ea
[TCPIP] Fix returned IP address when querying TCP connections
This gives something like that now: https://twitter.com/HeisSpiter/status/1065706156331606017 :-)

CORE-15363
2018-11-22 21:52:11 +01:00
Pierre Schweitzer f29016dabe
[TCPIP] Properly handle listening sockets
We first check if a socket is listening before
checking whether it has connections. This allows
properly returning listening address.
Furthermore, if it's listening, properly return
status so that it displays nice in netstat.

Result: https://twitter.com/HeisSpiter/status/1064245622323200000 :-)
2018-11-18 20:51:54 +01:00
Pierre Schweitzer 007f43dd56
[TCPIP] Implement returning UDP connections
CORE-5401
2018-11-18 16:30:45 +01:00
Pierre Schweitzer 77d5f04f22
[TCPIP] Implement returning TCP connections
CORE-5401
2018-11-18 16:30:45 +01:00
Pierre Schweitzer 4b4c0aabcd
[FASTFAT] Properly return failure in vfatFindDirSpace()
CID 1441394
2018-11-16 22:07:07 +01:00
Mark Harmstone 5729380349
[BTRFS] Import BTRFS upstream commit e43183a0 "open_file: set granted_access when creating file".
Better solution for the original problem described at:
https://github.com/maharmstone/btrfs/pull/123
2018-11-11 21:47:29 +01:00
Pierre Schweitzer f39f25ca17 [FLTMGR] Remove duplicated export 2018-10-29 23:56:39 +01:00
Ged Murphy fa46f362ea [FLTMGR] Add a bit more basic code layout for filter registration
Needs implementing
2018-10-29 23:56:39 +01:00
Pierre Schweitzer 97066b792c [FLTMGR] Remove duplicated export 2018-10-29 23:56:39 +01:00
Ged Murphy c73c1825e2 [FLTMGR] Callers must have registered an unload routine to be allowed to unload 2018-10-29 23:56:39 +01:00
Ged Murphy 4d603e689e [FLTMGR] Delete unused file 2018-10-29 23:56:39 +01:00
Pierre Schweitzer f21a2a6cfb [FLTMGR] Stub FltReleaseFileNameInformation() 2018-10-29 23:56:39 +01:00
Pierre Schweitzer c6b9ee5649 [FLTMGR] Stub FltGetDestinationFileNameInformation() 2018-10-29 23:56:39 +01:00
Pierre Schweitzer 08c4954007 [FLTMGR] Stub FltAttachVolume() 2018-10-29 23:56:39 +01:00
Pierre Schweitzer b67887df10 [FLTMGR] Export FltCreateCommunicationPort() and FltCloseCommunicationPort() 2018-10-29 23:56:39 +01:00
Pierre Schweitzer 1c5cc0ff08 [FLTMGR] Stub FltGetFileNameInformation() 2018-10-29 23:56:39 +01:00
Pierre Schweitzer c5a314b0f2 [FLTMGR] Implement FltGetVolumeName() 2018-10-29 23:56:39 +01:00
Pierre Schweitzer 21fcbcb37f [FLTMGR] Stub FltDetachVolume() 2018-10-29 23:56:39 +01:00
Pierre Schweitzer a7423ee45b [FLTMGR] Implement FltCreateFile() 2018-10-29 23:56:39 +01:00
Pierre Schweitzer 5fc37876d8 [FLTMGR] Stub FltCreateFileEx() 2018-10-29 23:56:39 +01:00
Pierre Schweitzer b9c6debe30 [FLTMGR] Export FltCloseClientPort() 2018-10-29 23:56:39 +01:00
Pierre Schweitzer 4c1d7026f6 [FLTMGR] Stub FltGetFileNameInformationUnsafe() 2018-10-29 23:56:39 +01:00
Pierre Schweitzer 92dca37278 [FLTMGR] Implement FltEnumerateVolumes() 2018-10-29 23:56:39 +01:00
Pierre Schweitzer 5bdd806fb9 [FLTMGR] Export FltObjectDereference() and FltSendMessage() 2018-10-29 23:56:39 +01:00
Thomas Faber b062d28bc6
[ACPICA] Update to version 20181003. CORE-15222 2018-10-28 15:28:37 +01:00
Thomas Faber 6847cc3ae0
[ACPICA] Update to version 20180531. CORE-15222 2018-10-28 15:28:34 +01:00
Thomas Faber 2deb69c1f8
[ACPICA] Update to version 20180105. CORE-15222 2018-10-28 15:28:32 +01:00
Thomas Faber ec55f0eb7f
[ACPICA] Update to version 20171215. CORE-15222 2018-10-28 15:28:29 +01:00
Hermès Bélusca-Maïto 8c0c90112e
[FASTFAT] Don't mess my debug log when partition SysType is printed! (when invalid chars are printed) 2018-10-13 19:57:24 +02:00
Thomas Faber c7af85b64b
[BTRFS] Fix IRP leak.
This leaked at least one IRP for every write, making it the largest leak when
running with BTRFS as the system volume.
Thanks to Victor Perevertkin.

Submitted upstream thanks to Pierre:
https://github.com/maharmstone/btrfs/pull/106
2018-09-30 16:11:42 +02:00
Pierre Schweitzer 257923cad1
[NPFS] Magic--; 2018-09-30 10:55:44 +02:00
Hermès Bélusca-Maïto 0c122589d2
[BLUE] Perform size/rectangle boundary checks on read/write operations. CORE-15108 2018-09-29 21:55:00 +02:00
Bernhard Feichtinger 9d1ee2400a [RAMDISK] Implement missing IOCTLs 2018-09-16 11:46:24 +02:00
Amine Khaldi 3bf751e046 [USBEHCI_NEW] Bring-in the USB EHCI miniport driver created by Vadim Galyant. (#301) 2018-09-10 09:05:35 +02:00
Vadim Galyant 3baf43c5de
[USBHUB_NEW][USBPORT] Fix buffer size calculation for multi-sz values in IRP_MN_QUERY_ID.
Also fix some copypasta'd DPRINTs.
2018-09-09 11:24:48 +02:00
Thomas Faber e400519cb5
[USBUHCI_NEW] Add license headers. 2018-09-08 10:16:02 +02:00
Thomas Faber 855df84fb2
[USBOHCI_NEW] Add license headers. 2018-09-08 10:15:52 +02:00
Thomas Faber d6d6b329be
[USBOHCI_NEW][USBUHCI_NEW] Avoid unnecessary/incorrect status defines. 2018-09-08 08:45:18 +02:00