Identifying writes to NFS
I'd like to be able to reliably recognise a PATH record which refers to an NFS mount. It seems that dev=00:xx would be related to the answer. However, each mount seems to have its own value of xx, and other mounts not backed by a block device, eg /proc and /dev, also have dev=00:xx.
The answer can't be related to a single system, as the solution has to be rolled out across a large estate with a variety of nfs mounts on particular servers.
Any ideas? Thanks,
Matt
Signature · 6 lines
Matthew Booth, RHCA, RHCSS Red Hat, Global Professional Services M: +44 (0)7977 267231 GPG ID: D33C3490 GPG FPR: 3733 612D 2D05 5458 8A8A 1600 3441 EA19 D33C 3490
Quoted 10 lines · Matthew Booth
I'd like to be able to reliably recognise a PATH record which refers to an NFS mount. It seems that dev=00:xx would be related to the answer. However, each mount seems to have its own value of xx, and other mounts not backed by a block device, eg /proc and /dev, also have dev=00:xx.
The answer can't be related to a single system, as the solution has to be rolled out across a large estate with a variety of nfs mounts on particular servers.
Any ideas? Thanks,
man statfs, look at f_type field there.
Quoted 6 lines · Alexander Viro
Quoted 4 lines
I'd like to be able to reliably recognise a PATH record which refers to an NFS mount.
Any ideas? Thanks,
man statfs, look at
f_typefield there.
While that does tell you the file system type, the audit rule comparitor does not use that field to trigger an event. Maybe that would be something useful to add to the comparitor?
Matthew, what kernel are you using?
-Steve
Quoted 3 lines · Steve Grubb
While that does tell you the file system type, the audit rule comparitor does not use that field to trigger an event. Maybe that would be something useful to add to the comparitor?
Actually I would be matching on this in an external system. That system would receive *all* open() calls. It just needs to be able to differentiate nfs from non-nfs.
Quoted 1 line
Matthew, what kernel are you using?
It's RHEL 4, x86_64.
Matt
Signature · 6 lines
Matthew Booth, RHCA, RHCSS Red Hat, Global Professional Services M: +44 (0)7977 267231 GPG ID: D33C3490 GPG FPR: 3733 612D 2D05 5458 8A8A 1600 3441 EA19 D33C 3490
Quoted 3 lines · Matthew Booth
Actually I would be matching on this in an external system. That system would receive *all*
open()calls. It just needs to be able to differentiate nfs from non-nfs.
Ok, I thought you wanted to audit by file system type and have the kernel distinguish it. If its external/post-processing, Al gave you the answer.
-Steve
Quoted 6 lines · Alexander Viro
Quoted 5 lines · Matthew Booth
I'd like to be able to reliably recognise a PATH record which refers to an NFS mount. It seems that dev=00:xx would be related to the answer. However, each mount seems to have its own value of xx, and other mounts not backed by a block device, eg /proc and /dev, also have dev=00:xx.
Quoted 7 lines
Quoted 5 lines
The answer can't be related to a single system, as the solution has to be rolled out across a large estate with a variety of nfs mounts on particular servers.
Any ideas? Thanks,
man statfs, look at
f_typefield there.
Looking at this again, this field doesn't appear to be in the audit data. Am I missing it? It's not possible to invoke statfs to determine this information as the system receiving the data is remote.
Matt
Signature · 6 lines
Matthew Booth, RHCA, RHCSS Red Hat, Global Professional Services M: +44 (0)7977 267231 GPG ID: D33C3490 GPG FPR: 3733 612D 2D05 5458 8A8A 1600 3441 EA19 D33C 3490
Quoted 4 lines · Matthew Booth
Quoted 1 line
man statfs, look at
f_typefield there.Looking at this again, this field doesn't appear to be in the audit data. Am I missing it?
Correct and nope.
Quoted 2 lines
It's not possible to invoke statfs to determine this information as the system receiving the data is remote.
Sounds like you wrote a relaying program, it would need to do the statfs against the path in the record and add that data before sending it.
-Steve