Posted: Fri 13 Nov 2009, 20:32 Post subject:
How to intercept an access call to a given directory..?

i want to be able to point access to a directory to other directories.
Like a link does, but I need it to access multiple target directories.

I`ve thought of a few ways of doing this, a kernel module`s the best.
I`ve done some C programming, but that level is beyond my abilities.

System calls can be used to intercept access to files and directories.
Again this is done with C only I believe, I`ve only seen C examples.

Is there a way of making Linux system calls using only Bash script?

I need to stop the directory access and run a script or C program.
It reads a file listing directories to search for the file being accessed.
If the file is found, it is accessed in place of the original file access.

Notice the comments "was" reference and the printf output is "past event" also.

I need to stop the access and run a script that does a "path" search for the file.

This is one method for making a "Multi-Link", a link that has multiple target directories.

A hard link points to files only.
A sym. link points to both files and directories.
A multi. link points to directories only.

It acts like PATH does, except it`s for directories that are not part of the PATH.
The union file system does the same thing also. except it`s complex over kill.
In reading about Linux kernel system calls, it looks like the way to do it.
But I don`t see how to do it except in C...
I really need a new type of link to be written into the kernel. " ln -m " = ( Multi-Link ).

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot vote in polls in this forumYou cannot attach files in this forumYou can download files in this forum