On Fri, Sep 03, 2004 at 02:12:21PM +0200, Kristian Sørensen wrote:Is there another way to get it? We also get an inodepointer from the LSM hook. As far as I know, the file struct has an entry called vfs_mount, which has an entry called root_mnt - could this be used? (and if so, how do I get from the Inode to the file struct? :-/ )
I have a short question, concerning how to get the full path of a file from a LSM hook.
- If the "file" of the dentry is located in the root filesystem: no
problem - simply traverse the dentrys, to generate the path.
- If the "file" is mounted from another partition, you do not get the
full path by traversing the dentrys.
There is no canonical full path for a given dentry.