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

Home NTFSD
Before Posting...
Please check out the Community Guidelines in the Announcements and Administration Category.

More Info on Driver Writing and Debugging


The free OSR Learning Library has more than 50 articles on a wide variety of topics about writing and debugging device drivers and Minifilters. From introductory level to advanced. All the articles have been recently reviewed and updated, and are written using the clear and definitive style you've come to expect from OSR over the years.


Check out The OSR Learning Library at: https://www.osr.com/osr-learning-library/


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
OSR has suspended in-person seminars due to the Covid-19 outbreak. But, don't miss your training! Attend via the internet instead!
Kernel Debugging 30 Mar 2020 OSR Seminar Space
Developing Minifilters 15 Jun 2020 LIVE ONLINE
Writing WDF Drivers 22 June 2020 LIVE ONLINE
Internals & Software Drivers 28 Sept 2020 Dulles, VA