linux/security/tomoyo
Tetsuo Handa 5625f2e326 TOMOYO: Change pathname for non-rename()able filesystems.
TOMOYO wants to use /proc/self/ rather than /proc/$PID/ if $PID matches current
thread's process ID in order to prevent current thread from accessing other
process's information unless needed.

But since procfs can be mounted on various locations (e.g. /proc/ /proc2/ /p/
/tmp/foo/100/p/ ), TOMOYO cannot tell that whether the numeric part in the
string returned by __d_path() represents process ID or not.

Therefore, to be able to convert from $PID to self no matter where procfs is
mounted, this patch changes pathname representations for filesystems which do
not support rename() operation (e.g. proc, sysfs, securityfs).

Examples:
  /proc/self/mounts => proc:/self/mounts
  /sys/kernel/security/ => sys:/kernel/security/
  /dev/pts/0 => devpts:/0

Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: James Morris <jmorris@namei.org>
2011-06-29 09:31:21 +10:00
..
audit.c TOMOYO: Add policy namespace support. 2011-06-29 09:31:21 +10:00
common.c TOMOYO: Add policy namespace support. 2011-06-29 09:31:21 +10:00
common.h TOMOYO: Add policy namespace support. 2011-06-29 09:31:21 +10:00
domain.c TOMOYO: Add policy namespace support. 2011-06-29 09:31:21 +10:00
file.c TOMOYO: Change pathname for non-rename()able filesystems. 2011-06-29 09:31:21 +10:00
gc.c TOMOYO: Add policy namespace support. 2011-06-29 09:31:21 +10:00
group.c TOMOYO: Use struct for passing ACL line. 2011-06-29 09:31:20 +10:00
Kconfig Kconfig and Makefile 2009-02-12 15:19:00 +11:00
load_policy.c Fix common misspellings 2011-03-31 11:26:23 -03:00
Makefile TOMOYO: Add auditing interface. 2011-06-29 09:31:20 +10:00
memory.c TOMOYO: Add policy namespace support. 2011-06-29 09:31:21 +10:00
mount.c TOMOYO: Add auditing interface. 2011-06-29 09:31:20 +10:00
realpath.c TOMOYO: Change pathname for non-rename()able filesystems. 2011-06-29 09:31:21 +10:00
securityfs_if.c TOMOYO: Add auditing interface. 2011-06-29 09:31:20 +10:00
tomoyo.c TOMOYO: Cleanup part 1. 2011-06-29 09:31:19 +10:00
util.c TOMOYO: Add policy namespace support. 2011-06-29 09:31:21 +10:00