VirtualBox

Changeset 78543 in vbox


Ignore:
Timestamp:
May 16, 2019 11:35:40 AM (6 years ago)
Author:
vboxsync
Message:

winnt/vboxsf: Started on VBoxMRxCreate. bugref:9172

Location:
trunk/src/VBox/Additions/WINNT/SharedFolders/driver
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/SharedFolders/driver/info.cpp

    r78541 r78543  
    531531/**
    532532 * Updates VBSFNTFCBEXT::VolInfo.
     533 *
     534 * Currently no kind of FCB lock is normally held.
    533535 */
    534536static NTSTATUS vbsfNtUpdateFcbVolInfo(PVBSFNTFCBEXT pVBoxFcbX, PMRX_VBOX_NETROOT_EXTENSION pNetRootExtension,
     
    11181120    return Status;
    11191121}
     1122
     1123
     1124/*********************************************************************************************************************************
     1125*   VBoxMRxQueryFileInfo                                                                                                         *
     1126*********************************************************************************************************************************/
    11201127
    11211128/**
     
    16431650    return Status;
    16441651}
     1652
     1653
     1654/*********************************************************************************************************************************
     1655*   VBoxMRxSetFileInfo                                                                                                           *
     1656*********************************************************************************************************************************/
    16451657
    16461658/**
     
    22562268}
    22572269
     2270/**
     2271 * This is a no-op because we already set the file timestamps before closing,
     2272 * and generally the host takes care of this.
     2273 *
     2274 * RDBSS calls this if it things we might need to update file information as the
     2275 * file is closed.
     2276 */
    22582277NTSTATUS VBoxMRxSetFileInfoAtCleanup(IN PRX_CONTEXT RxContext)
    22592278{
  • trunk/src/VBox/Additions/WINNT/SharedFolders/driver/path.cpp

    r78468 r78543  
    471471NTSTATUS VBoxMRxCreate(IN OUT PRX_CONTEXT RxContext)
    472472{
    473     NTSTATUS Status = STATUS_SUCCESS;
    474 
    475473    RxCaptureFcb;
    476474    RxCaptureFobx;
    477 
    478     PMRX_NET_ROOT pNetRoot = capFcb->pNetRoot;
    479     PMRX_SRV_OPEN SrvOpen = RxContext->pRelevantSrvOpen;
    480     PUNICODE_STRING RemainingName = GET_ALREADY_PREFIXED_NAME_FROM_CONTEXT(RxContext);
    481 
    482     SHFLFSOBJINFO Info = {0};
    483 
    484     ULONG CreateAction = FILE_CREATED;
    485     SHFLHANDLE Handle = SHFL_HANDLE_NIL;
    486     PMRX_VBOX_FOBX pVBoxFobx;
    487 
    488     RT_NOREF(__C_Fobx); /* RxCaptureFobx */
     475    PMRX_NET_ROOT               pNetRoot          = capFcb->pNetRoot;
     476    PMRX_SRV_OPEN               SrvOpen           = RxContext->pRelevantSrvOpen;
     477    PUNICODE_STRING             RemainingName     = GET_ALREADY_PREFIXED_NAME_FROM_CONTEXT(RxContext);
     478    PMRX_VBOX_NETROOT_EXTENSION pNetRootExtension = VBoxMRxGetNetRootExtension(capFcb->pNetRoot);
     479    ULONG                       CreateAction      = FILE_CREATED;
     480    SHFLHANDLE                  Handle            = SHFL_HANDLE_NIL;
     481    SHFLFSOBJINFO               Info              = {0};
     482    NTSTATUS                    Status            = STATUS_SUCCESS;
     483    PMRX_VBOX_FOBX              pVBoxFobx;
     484
     485    RT_NOREF(capFobx); /* RxCaptureFobx */
    489486
    490487    Log(("VBOXSF: MRxCreate: name ptr %p length=%d, SrvOpen->Flags 0x%08X\n",
     
    499496
    500497    if (RemainingName->Length)
    501     {
    502498        Log(("VBOXSF: MRxCreate: Attempt to open %.*ls\n",
    503499             RemainingName->Length/sizeof(WCHAR), RemainingName->Buffer));
    504     }
    505     else
    506     {
    507         if (FlagOn(RxContext->Create.Flags, RX_CONTEXT_CREATE_FLAG_STRIPPED_TRAILING_BACKSLASH))
    508         {
    509             Log(("VBOXSF: MRxCreate: Empty name -> Only backslash used\n"));
    510             RemainingName = &g_UnicodeBackslash;
    511         }
     500    else if (FlagOn(RxContext->Create.Flags, RX_CONTEXT_CREATE_FLAG_STRIPPED_TRAILING_BACKSLASH))
     501    {
     502        Log(("VBOXSF: MRxCreate: Empty name -> Only backslash used\n"));
     503        RemainingName = &g_UnicodeBackslash;
    512504    }
    513505
     
    517509        Log(("VBOXSF: MRxCreate: netroot type %d not supported\n",
    518510             pNetRoot->Type));
    519         Status = STATUS_NOT_IMPLEMENTED;
    520         goto Exit;
     511        return STATUS_NOT_IMPLEMENTED;
    521512    }
    522513
     
    533524        Log(("VBOXSF: MRxCreate: vbsfProcessCreate failed 0x%08X\n",
    534525             Status));
    535         goto Exit;
     526        return Status;
    536527    }
    537528
     
    543534    {
    544535        Log(("VBOXSF: MRxCreate: RxCreateNetFobx failed\n"));
    545         Status = STATUS_INSUFFICIENT_RESOURCES;
    546         goto Exit;
    547     }
     536        VbglR0SfHostReqCloseSimple(pNetRootExtension->map.root, Handle);
     537        return STATUS_INSUFFICIENT_RESOURCES;
     538    }
     539    pVBoxFobx = VBoxMRxGetFileObjectExtension(RxContext->pFobx);
     540    Log(("VBOXSF: MRxCreate: VBoxFobx = %p\n",
     541         pVBoxFobx));
     542    AssertReturnStmt(pVBoxFobx, VbglR0SfHostReqCloseSimple(pNetRootExtension->map.root, Handle), STATUS_INTERNAL_ERROR);
     543
    548544
    549545    Log(("VBOXSF: MRxCreate: CreateAction = 0x%08X\n",
     
    595591    RxContext->pFobx->OffsetOfNextEaToReturn = 1;
    596592
    597     pVBoxFobx = VBoxMRxGetFileObjectExtension(RxContext->pFobx);
    598 
    599     Log(("VBOXSF: MRxCreate: VBoxFobx = %p\n",
    600          pVBoxFobx));
    601 
    602     if (!pVBoxFobx)
    603     {
    604         Log(("VBOXSF: MRxCreate: no VBoxFobx!\n"));
    605         AssertFailed();
    606         Status = STATUS_INSUFFICIENT_RESOURCES;
    607         goto Exit;
    608     }
    609 
    610593    pVBoxFobx->hFile = Handle;
    611594    pVBoxFobx->pSrvCall = RxContext->Create.pSrvCall;
     
    643626         Status));
    644627
    645 Exit:
    646628    return Status;
    647629}
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette