VirtualBox

Changeset 71978 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Apr 23, 2018 11:26:21 AM (7 years ago)
Author:
vboxsync
Message:

rtPathNtQueryInfoInDirectoryObject: Return caller status when NtOpenDirectoryObject fails.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r3/nt/RTPathQueryInfo-nt.cpp

    r70940 r71978  
    179179 * @param   pvBuf           Query buffer space.
    180180 * @param   cbBuf           Size of the buffer.  ASSUMES lots of space.
     181 * @param   rcNtCaller      The status code that got us here.
    181182 */
    182183static int rtPathNtQueryInfoInDirectoryObject(OBJECT_ATTRIBUTES *pObjAttr, PRTFSOBJINFO pObjInfo,
    183184                                              RTFSOBJATTRADD enmAddAttr, uint32_t fFlags,
    184                                               void *pvBuf, size_t cbBuf)
     185                                              void *pvBuf, size_t cbBuf, NTSTATUS rcNtCaller)
    185186{
    186187    RT_NOREF(fFlags);
     
    271272            return VERR_FILE_NOT_FOUND;
    272273    }
     274    else
     275        return RTErrConvertFromNtStatus(rcNtCaller);
    273276    return RTErrConvertFromNtStatus(rcNt);
    274277}
     
    410413                 || rcNt == STATUS_INVALID_PARAMETER)
    411414        {
    412             rc = rtPathNtQueryInfoInDirectoryObject(&ObjAttr, pObjInfo, enmAddAttr, fFlags, &uBuf, sizeof(uBuf));
     415            rc = rtPathNtQueryInfoInDirectoryObject(&ObjAttr, pObjInfo, enmAddAttr, fFlags, &uBuf, sizeof(uBuf), rcNt);
    413416            if (RT_SUCCESS(rc))
    414417                return rc;
     
    517520                 /*|| rcNt == STATUS_INVALID_PARAMETER*/)
    518521        {
    519             rc = rtPathNtQueryInfoInDirectoryObject(&ObjAttr, pObjInfo, enmAddAttr, fFlags, &uBuf, sizeof(uBuf));
     522            rc = rtPathNtQueryInfoInDirectoryObject(&ObjAttr, pObjInfo, enmAddAttr, fFlags, &uBuf, sizeof(uBuf), rcNt);
    520523            if (RT_SUCCESS(rc))
    521524                return rc;
     
    618621        {
    619622            InitializeObjectAttributes(&ObjAttr, pNtName, OBJ_CASE_INSENSITIVE, hRootDir, NULL);
    620             rc = rtPathNtQueryInfoInDirectoryObject(&ObjAttr, pObjInfo, enmAddAttr, fFlags, &uBuf, sizeof(uBuf));
     623            rc = rtPathNtQueryInfoInDirectoryObject(&ObjAttr, pObjInfo, enmAddAttr, fFlags, &uBuf, sizeof(uBuf), rcNt);
    621624            if (RT_FAILURE(rc))
    622625                rc = RTErrConvertFromNtStatus(rcNt);
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