public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Getting full path from dentry in LSM hooks
@ 2004-09-03 12:12 Kristian Sørensen
  2004-09-03 12:32 ` Christoph Hellwig
                   ` (2 more replies)
  0 siblings, 3 replies; 22+ messages in thread
From: Kristian Sørensen @ 2004-09-03 12:12 UTC (permalink / raw)
  To: Linux Kernel Mailing List; +Cc: umbrella-devel

Hi!

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.

Example:
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-2.6.8.1 
instead of /boot/kernel-2.6.8.1)


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 -- http://umbrella.sf.net

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2004-09-07 14:19 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-03 12:12 Getting full path from dentry in LSM hooks Kristian Sørensen
2004-09-03 12:32 ` Christoph Hellwig
2004-09-03 12:38   ` [Umbrella-devel] " Kristian Sørensen
2004-09-03 13:04     ` Christoph Hellwig
2004-09-03 13:20       ` Kristian Sørensen
2004-09-03 14:01         ` Christoph Hellwig
2004-09-03 19:54           ` Kristian Sørensen
2004-09-04 11:09             ` Christoph Hellwig
2004-09-04 18:52               ` Kristian Sørensen
2004-09-03 15:38         ` Stephen Smalley
2004-09-03 12:43 ` Andrea Arcangeli
2004-09-03 14:14 ` Alan Cox
2004-09-03 20:05   ` [Umbrella-devel] " Kristian Sørensen
2004-09-03 20:39     ` Valdis.Kletnieks
2004-09-04  9:06       ` Kristian Sørensen
2004-09-04 10:50       ` Emmanuel Fleury
2004-09-07 14:19       ` Kristian Sørensen
2004-09-04  2:41     ` Horst von Brand
2004-09-04 19:01       ` Kristian Sørensen
2004-09-04 19:06       ` Kristian Sørensen
2004-09-04 16:56     ` Alan Cox
2004-09-04 18:47       ` Kristian Sørensen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox