https://git.reactos.org/?p=reactos.git;a=commitdiff;h=45b5ec8e7bf4e95c3a1826f7b13e2b225d8f81bc

commit 45b5ec8e7bf4e95c3a1826f7b13e2b225d8f81bc
Author:     Joachim Henze <[email protected]>
AuthorDate: Sat Feb 17 20:28:15 2018 +0100
Commit:     Joachim Henze <[email protected]>
CommitDate: Thu Apr 2 15:09:46 2020 +0200

    [RDBSS] Avoid CORE-13938
    
    Pierre recommended this workaround for 0.4.8rls before.
    Avoids "GetVolumeInformation now fails on NFS volume"
    
    This workaround was recurrently applied for all releases
    0.4.8, 0.4.9, 0.4.10, 0.4.11, 0.4.12, 0.4.13.
    
    I never got any reply in the regression-ticket and recurrently
    applying this over and over again is a waste of time.
    So I decided to commit to master today, but will leave
    the ticket unresolved, so when a proper fix will arrive in the future,
    the existing ticket will remind us to undo this workaround.
    
    Please note that I replaced #if 0 with #if 1
    as discussed with Pierre. That's different to the patch in ticket.
---
 sdk/lib/drivers/rdbsslib/rdbss.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/sdk/lib/drivers/rdbsslib/rdbss.c b/sdk/lib/drivers/rdbsslib/rdbss.c
index 851b0f543a3..4fe01867172 100644
--- a/sdk/lib/drivers/rdbsslib/rdbss.c
+++ b/sdk/lib/drivers/rdbsslib/rdbss.c
@@ -8319,6 +8319,16 @@ RxQueryNameInfo(
         return STATUS_BUFFER_OVERFLOW;
     }
 
+#if 1 // CORE-13938, rfb: please note I replaced 0 with 1 here
+    if (NodeType(Fcb) == RDBSS_NTC_STORAGE_TYPE_DIRECTORY &&
+        RxContext->Info.LengthRemaining >= sizeof(WCHAR))
+    {
+        NameInfo->FileName[NameInfo->FileNameLength / sizeof(WCHAR)] = L'\\';
+        NameInfo->FileNameLength += sizeof(WCHAR);
+        RxContext->Info.LengthRemaining -= sizeof(WCHAR);
+    }
+#endif
+
     /* All correct */
     return STATUS_SUCCESS;
 }

Reply via email to