[lkml]   [2004]   [Sep]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectGetting full path from dentry in LSM hooks

    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.

    If we have a system with a normal root (/) and a seperate boot partition
    (mounted on /boot :). In the LSM hook inode_permission, you get the
    arguments (struct inode *inode, int mask, struct nameidata *nd).
    Finding the path, we traverse the dentrys from (nd->dentry). But if the
    inode is a file in /boot we only get the filename (e.g. kernel-
    instead of /boot/kernel-

    Can some one reveal the trick to get the full path nomater if the
    filesystem is root or mounted elsewhere in the filesystem?

    Best regards,
    Kristian Sørensen.
    The Umbrella Project --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 14:05    [W:0.021 / U:29.516 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site