* File change notification along with user
@ 2011-09-21 4:33 V.Ravikumar
2011-09-21 4:57 ` rohan puri
0 siblings, 1 reply; 8+ messages in thread
From: V.Ravikumar @ 2011-09-21 4:33 UTC (permalink / raw)
To: kernelnewbies
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110921/82479767/attachment.html
^ permalink raw reply [flat|nested] 8+ messages in thread
* File change notification along with user
2011-09-21 4:33 File change notification along with user V.Ravikumar
@ 2011-09-21 4:57 ` rohan puri
2011-10-12 5:20 ` V.Ravikumar
0 siblings, 1 reply; 8+ messages in thread
From: rohan puri @ 2011-09-21 4:57 UTC (permalink / raw)
To: kernelnewbies
On Wed, Sep 21, 2011 at 10:03 AM, V.Ravikumar
<ravikumar.vallabhu@gmail.com>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 at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
> You can have a look at fanotify.
Refer http://lwn.net/Articles/339253/
Regards,
Rohan Puri
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110921/ee107bb2/attachment.html
^ permalink raw reply [flat|nested] 8+ messages in thread
* File change notification along with user
2011-09-21 4:57 ` rohan puri
@ 2011-10-12 5:20 ` V.Ravikumar
2011-10-12 6:00 ` Abhijit Pawar
2011-10-12 6:34 ` rohan puri
0 siblings, 2 replies; 8+ messages in thread
From: V.Ravikumar @ 2011-10-12 5:20 UTC (permalink / raw)
To: kernelnewbies
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,
Ravi
On Wed, Sep 21, 2011 at 10:27 AM, rohan puri <rohan.puri15@gmail.com> wrote:
>
>
> On Wed, Sep 21, 2011 at 10:03 AM, V.Ravikumar <
> ravikumar.vallabhu at gmail.com> 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 at kernelnewbies.org
>> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>>
>> You can have a look at fanotify.
>
> Refer http://lwn.net/Articles/339253/
>
> Regards,
> Rohan Puri
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20111012/bfe695ab/attachment-0001.html
^ permalink raw reply [flat|nested] 8+ messages in thread
* File change notification along with user
2011-10-12 5:20 ` V.Ravikumar
@ 2011-10-12 6:00 ` Abhijit Pawar
2011-10-12 6:22 ` V.Ravikumar
2011-10-12 6:34 ` rohan puri
1 sibling, 1 reply; 8+ messages in thread
From: Abhijit Pawar @ 2011-10-12 6:00 UTC (permalink / raw)
To: kernelnewbies
On 10/12/2011 10:50 AM, V.Ravikumar 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,
> Ravi
>
> On Wed, Sep 21, 2011 at 10:27 AM, rohan puri <rohan.puri15@gmail.com
> <mailto:rohan.puri15@gmail.com>> wrote:
>
>
>
> On Wed, Sep 21, 2011 at 10:03 AM, V.Ravikumar
> <ravikumar.vallabhu@gmail.com
> <mailto:ravikumar.vallabhu@gmail.com>> 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 at kernelnewbies.org
> <mailto:Kernelnewbies@kernelnewbies.org>
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
> You can have a look at fanotify.
>
> Refer http://lwn.net/Articles/339253/
>
> Regards,
> Rohan Puri
>
>
>
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Hi Ravi,
As mentioned in the article, you can start looking at fsnotify code in
the kernel. What we need is like something inserted between the VFS
Layer and the filesystem driver which will tell you what is going on.
Regards,
Abhijit Pawar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20111012/1c99d836/attachment.html
^ permalink raw reply [flat|nested] 8+ messages in thread
* File change notification along with user
2011-10-12 6:00 ` Abhijit Pawar
@ 2011-10-12 6:22 ` V.Ravikumar
0 siblings, 0 replies; 8+ messages in thread
From: V.Ravikumar @ 2011-10-12 6:22 UTC (permalink / raw)
To: kernelnewbies
On Wed, Oct 12, 2011 at 11:30 AM, Abhijit Pawar <apawar.linux@gmail.com>wrote:
> On 10/12/2011 10:50 AM, V.Ravikumar 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,
> Ravi
>
> On Wed, Sep 21, 2011 at 10:27 AM, rohan puri <rohan.puri15@gmail.com>wrote:
>
>>
>>
>> On Wed, Sep 21, 2011 at 10:03 AM, V.Ravikumar <
>> ravikumar.vallabhu at gmail.com> 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 at kernelnewbies.org
>>> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>>>
>>> You can have a look at fanotify.
>>
>> Refer http://lwn.net/Articles/339253/
>>
>> Regards,
>> Rohan Puri
>>
>
>
>
> _______________________________________________
> Kernelnewbies mailing listKernelnewbies at kernelnewbies.orghttp://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
> Hi Ravi,
> As mentioned in the article, you can start looking at fsnotify code in the
> kernel. What we need is like something inserted between the VFS Layer and
> the filesystem driver which will tell you what is going on.
>
> Regards,
> Abhijit Pawar
>
Thank you Abhijit for your response.
Previously I had gone through the inotify code (ie fsnotify). What I've
observed is, there are inotify patches *(with fsnotify_ prefix )* in every
file I/O system calls implementation. So what I understood is we can not
achieve file change notification without patching the existing kernel source
code. ie I can not achieve this using a simple device driver kind of
mechanism.
Please correct me if I'm wrong.
Regards,
Ravi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20111012/5513881c/attachment.html
^ permalink raw reply [flat|nested] 8+ messages in thread
* File change notification along with user
2011-10-12 5:20 ` V.Ravikumar
2011-10-12 6:00 ` Abhijit Pawar
@ 2011-10-12 6:34 ` rohan puri
2011-10-12 6:47 ` V.Ravikumar
1 sibling, 1 reply; 8+ messages in thread
From: rohan puri @ 2011-10-12 6:34 UTC (permalink / raw)
To: kernelnewbies
On Wed, Oct 12, 2011 at 10:50 AM, V.Ravikumar
<ravikumar.vallabhu@gmail.com>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,
> Ravi
>
> On Wed, Sep 21, 2011 at 10:27 AM, rohan puri <rohan.puri15@gmail.com>wrote:
>
>>
>>
>> On Wed, Sep 21, 2011 at 10:03 AM, V.Ravikumar <
>> ravikumar.vallabhu at gmail.com> 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 at kernelnewbies.org
>>> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>>>
>>> You can have a look at fanotify.
>>
>> 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.
*
refer ecryptfs for an example.
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
3. See if the module making use of LSM infrastructure will be able to do
this or not.
Regards,
Rohan Puri
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20111012/9a024acc/attachment.html
^ permalink raw reply [flat|nested] 8+ messages in thread
* File change notification along with user
2011-10-12 6:34 ` rohan puri
@ 2011-10-12 6:47 ` V.Ravikumar
2011-10-12 6:59 ` rohan puri
0 siblings, 1 reply; 8+ messages in thread
From: V.Ravikumar @ 2011-10-12 6:47 UTC (permalink / raw)
To: kernelnewbies
On Wed, Oct 12, 2011 at 12:04 PM, rohan puri <rohan.puri15@gmail.com> wrote:
>
>
> On Wed, Oct 12, 2011 at 10:50 AM, V.Ravikumar <
> ravikumar.vallabhu at gmail.com> 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,
>> Ravi
>>
>> On Wed, Sep 21, 2011 at 10:27 AM, rohan puri <rohan.puri15@gmail.com>wrote:
>>
>>>
>>>
>>> On Wed, Sep 21, 2011 at 10:03 AM, V.Ravikumar <
>>> ravikumar.vallabhu at gmail.com> 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 at kernelnewbies.org
>>>> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>>>>
>>>> You can have a look at fanotify.
>>>
>>> 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.
>
> *
> refer ecryptfs for an example.
>
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
choice
3. See if the module making use of LSM infrastructure will be able to do
> this or not.
>
> Regards,
> Rohan Puri
>
Hi Rohan
Thank you for your valuable inputs. I will through the ecryptfs
Thanks
Ravi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20111012/3c871baa/attachment-0001.html
^ permalink raw reply [flat|nested] 8+ messages in thread
* File change notification along with user
2011-10-12 6:47 ` V.Ravikumar
@ 2011-10-12 6:59 ` rohan puri
0 siblings, 0 replies; 8+ messages in thread
From: rohan puri @ 2011-10-12 6:59 UTC (permalink / raw)
To: kernelnewbies
On Wed, Oct 12, 2011 at 12:17 PM, V.Ravikumar
<ravikumar.vallabhu@gmail.com>wrote:
>
> On Wed, Oct 12, 2011 at 12:04 PM, rohan puri <rohan.puri15@gmail.com>wrote:
>
>>
>>
>> On Wed, Oct 12, 2011 at 10:50 AM, V.Ravikumar <
>> ravikumar.vallabhu at gmail.com> 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,
>>> Ravi
>>>
>>> On Wed, Sep 21, 2011 at 10:27 AM, rohan puri <rohan.puri15@gmail.com>wrote:
>>>
>>>>
>>>>
>>>> On Wed, Sep 21, 2011 at 10:03 AM, V.Ravikumar <
>>>> ravikumar.vallabhu at gmail.com> 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 at kernelnewbies.org
>>>>> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>>>>>
>>>>> You can have a look at fanotify.
>>>>
>>>> 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.
>>
>> *
>> refer ecryptfs for an example.
>>
>
> 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
> choice
>
> 3. See if the module making use of LSM infrastructure will be able to do
>> this or not.
>>
>> Regards,
>> Rohan Puri
>>
> Hi Rohan
>
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20111012/f40f2dfe/attachment.html
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2011-10-12 6:59 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-21 4:33 File change notification along with user V.Ravikumar
2011-09-21 4:57 ` rohan puri
2011-10-12 5:20 ` V.Ravikumar
2011-10-12 6:00 ` Abhijit Pawar
2011-10-12 6:22 ` V.Ravikumar
2011-10-12 6:34 ` rohan puri
2011-10-12 6:47 ` V.Ravikumar
2011-10-12 6:59 ` rohan puri
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.