f



Create a file handler to allow more permission checking on files open?

Hi,

Is there a way to (with the win32 api) create a file handler which will
detect when a user is attempting to open a file and then write some
code to do some business rule checks and set the files permissions and
then continue with the opening process?

I know that I can use HTTP file handlers in .net but this is only for a
web site I want this to be for all files... anyone got any ideas?
Thanks,

Scott

0
scott
1/18/2005 1:47:34 AM
comp.os.programmer.win32 14523 articles. 0 followers. Post Follow

1 Replies
521 Views

Similar Articles

[PageSpeed] 33

<scott.pyke@midware.com.au> wrote in message
news:1106012854.411022.312280@c13g2000cwb.googlegroups.com...
> Hi,
>
> Is there a way to (with the win32 api) create a file handler which will
> detect when a user is attempting to open a file and then write some
> code to do some business rule checks and set the files permissions and
> then continue with the opening process?

You didn't say if you want the account that tries to access the file to
be used to modify the access right or will the decision be based on
for instance the time of day?

There are many ways to do what you need. I'm assuming you need only to grant
permission.

One way would be to use a file system filter driver to monitor all file I/O.

Another would be to peridically look for changes in the relevant folders
with FindFirstChangeNotification and then update the permissions for
the users with an active session or users mentioned in the Security log.

The problem is that without a client-server model you will get huge
permission issues and the tools accessing the file would be forced
to retry etc.

I could pay of to describe your actual problem in more detail...

- Sten


0
Sten
1/18/2005 1:43:56 PM
Reply: