Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results

Sept/Oct 2019 Issue of The NT Insider available


Download PDF here: http://insider.osr.com/2019/ntinsider_2019_01.pdf

It’s a particularly BIG issue, too: 40 pages of technical goodness, ranging from WDF to Minifilters. Check it out.
Before Posting...
Please check out the Community Guidelines in the Announcements and Administration Category.

FltReissueSynchronousIo and mapped network drive

Alexandr_GerbedzAlexandr_Gerbedz Member Posts: 2

Hi,

We have a product with typical antivirus logic: minifilter notifies UM service about files, UM processes them somehow. During processing UM opens file target file. If 2nd application tries to open file, it might get "sharing violation" error (and some other errors because UM service actions). To solve this problem minifilter has following logic in PostCreate:

if (  CallbackData->IoStatus.Status == STATUS_SHARING_VIOLATION || CallbackData->IoStatus.Status == STATUS_USER_MAPPED_FILE )
{
    if ( UM service is working with this file right now )
    {
        // ask UM to stop working with this file.
          ...
        // UM influence is removed - reissue io
        FltReissueSynchronousIo( Instance, CallbackData );
    }
}

It works fine for local files and for network files when application\user opens to them by regular network path (\ServerName\ShareName\FileName.ext).
The problem is that if user maps "\ServerName\ShareName" to "Z:" drive and opens the same file by "Z:\FileName.ext", then after FltReissueSynchronousIo call I have 0xC0000039 in IoStatus.Status. Which is STATUS_OBJECT_PATH_INVALID. I don't do any changes in CallbackData - use the same as filter manager passes to PostCreate callback.

Do you have any ideas how to make it work with mapped network drives?

Thanks,
Alex.

Comments

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Upcoming OSR Seminars
Writing WDF Drivers 21 Oct 2019 OSR Seminar Space & ONLINE
Internals & Software Drivers 18 Nov 2019 Dulles, VA
Kernel Debugging 30 Mar 2020 OSR Seminar Space
Developing Minifilters 27 Apr 2020 OSR Seminar Space & ONLINE