On Wed, Oct 12, 2011 at 12:17 PM, V.Ravikumar <ravikumar.vallabhu@xxxxxxxxx> wrote:
Hi RohanOn Wed, Oct 12, 2011 at 12:04 PM, rohan puri <rohan.puri15@xxxxxxxxx> wrote:
refer ecryptfs for an example.On Wed, Oct 12, 2011 at 10:50 AM, V.Ravikumar <ravikumar.vallabhu@xxxxxxxxx> wrote:
Other than fanotify , I can achieve my requirement through a driver/module. If this can be achieved through a driver/module please provide me inputs to start.
Thanks,
RaviOn Wed, Sep 21, 2011 at 10:27 AM, rohan puri <rohan.puri15@xxxxxxxxx> wrote:
You can have a look at fanotify.On Wed, Sep 21, 2011 at 10:03 AM, V.Ravikumar <ravikumar.vallabhu@xxxxxxxxx> wrote:
_______________________________________________Hi all,
Is it possible to write a module/driver which notifies file/directory change asynchronously along with user name(or with uid) who modified it.
inotify will do change notification but it will not provide uid who modified/created the file.
audit and inotify combination can work, but I'm looking for a better option than this.
Please help me.
Thanks,
Ravi
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Refer http://lwn.net/Articles/339253/
Regards,
Rohan Puri
Hi Ravi,
See, first of all if you want to notify file/dir change you need to the control after the invocation of that i_ops or f_ops. So there are two ways in which you can do : -
1. Easy & recommended : -
Write a stackable file system module. The aim of this module will be to intercept vfs-calls on files/dirs & then call the underlying file systems specific operations. Now after completion of this operation, you would generate the change event here which will be used to notify.
Note : - stackable file system research work was done by Professor Erez Zadok.
This is more helpful for me.
2. Complex & not recommended : -
Instead of writing a stackable file system, you hook the mount sys call to get the control of the fs related structs. Then replace the original i_ops and f_ops pointer with your own defined ops. save the originals somewhere. Then when from user-space when some change operation is called, internally your ops will be called and now you call the original stored one and contruct the notification events
Even I've this in my mind. As it is not recommended,I had dropped this choice3. See if the module making use of LSM infrastructure will be able to do this or not.
Regards,
Rohan Puri
Thank you for your valuable inputs. I will through the ecryptfs
Thanks
Ravi
Hi Ravi,
Good :). One more thing about that first approach, that stackable file system has to be mounted on the top-level directory, for which (sub-dirs and files) you need the notifications. This acts as the stacking trigger point.
Was just keen to know, where are you requiring it?
Regards,
Rohan Puri
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@xxxxxxxxxxxxxxxxx http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies