EldoS | Feel safer!

Software components for data protection, secure storage and transfer

CbFltSetEndOfFileC callback not respecting ProcessRequest

Also by EldoS: SecureBlackbox
200+ components and classes for digital security, signing, encryption and secure networking.
#12426
Posted: 02/12/2010 16:04:42
by James M (Basic support level)
Joined: 02/12/2010
Posts: 2

Hi,

I am currently evaluating CallbackFilter. I can't seem to get the callback filter to respect me setting ProcessRequest (from .NET) to false in this callback. Regardless of what I do the underlying request is passed on to the OS and the file is truncated.

Is this a limitation of CallbackFilter or is it possible to do what I am trying to do?

Thanks,

James
#12432
Posted: 02/15/2010 08:40:54
by Vladimir Cherniga (EldoS Corp.)

Hi, how exactly do you process this callback. Did you try to throw ECBFltError exception with some error code ?
#12433
Posted: 02/15/2010 08:46:53
by James M (Basic support level)
Joined: 02/12/2010
Posts: 2

I tried two different approaches:

Calling
m_filter->SetEndOfFile(m_myHandle, newEofValue);
ProcessRequest = false; // do not continue to process this IO.

And also doing:
EndOfFile = new value; // EndOfFile is ref parameter which is passed in..
ProcessRequest = true;

Have not tried throwing an exception, if I do that what will get reported back to the Usermode application which called SetEndOfFile?

Regards,

James
#12434
Posted: 02/15/2010 09:07:06
by Vladimir Cherniga (EldoS Corp.)

Quote
James M wrote:
Have not tried throwing an exception, if I do that what will get reported back to the Usermode application which called SetEndOfFile?


It depends on error code that you will return from this callback.

The other method is to intercept precreate/preopen file requests and modify
attributes requested by user (for example try to clear FILE_APPEND_DATA flag in DesiredAccess parameter).
#16662
Posted: 06/14/2011 11:58:26
by Paul Greer (Basic support level)
Joined: 05/17/2011
Posts: 1

I am having this same issue. Can you please explain exactly how you are supposed to use this callback. As what James M seems to be doing is implied by the documentation.
#16663
Posted: 06/14/2011 14:36:10
by Vladimir Cherniga (EldoS Corp.)

File size may be truncated during create request, when CreateDispositon parameter of OnCreateFileC/OnOpenFileC callback is equal to one of the following value: FILE_OVERWRITE, FILE_OVERWRITE_IF, FILE_SUPERSEDE. File size may be extended also during non-paging user write request, without sending IRP_MJ_SET_INFORMATION (with corresponding CbFltSetEndOfFileC callback) request to the file system driver.
Also by EldoS: CallbackDisk
Create virtual disks backed by memory or custom location, expose disk images as disks and more.

Reply

Statistics

Topic viewed 2975 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!