diff options
author | James Morris <jmorris@namei.org> | 2005-10-31 01:59:22 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-10-31 04:37:11 +0300 |
commit | d381d8a9a08cac9824096213069159be17fd2e2f (patch) | |
tree | 0c19722b8f67c29b7c08c6ab8776a9c146395d03 /fs/binfmt_elf_fdpic.c | |
parent | 89d155ef62e5e0c10e4b37aaa5056f0beafe10e6 (diff) | |
download | linux-d381d8a9a08cac9824096213069159be17fd2e2f.tar.xz |
[PATCH] SELinux: canonicalize getxattr()
This patch allows SELinux to canonicalize the value returned from
getxattr() via the security_inode_getsecurity() hook, which is called after
the fs level getxattr() function.
The purpose of this is to allow the in-core security context for an inode
to override the on-disk value. This could happen in cases such as
upgrading a system to a different labeling form (e.g. standard SELinux to
MLS) without needing to do a full relabel of the filesystem.
In such cases, we want getxattr() to return the canonical security context
that the kernel is using rather than what is stored on disk.
The implementation hooks into the inode_getsecurity(), adding another
parameter to indicate the result of the preceding fs-level getxattr() call,
so that SELinux knows whether to compare a value obtained from disk with
the kernel value.
We also now allow getxattr() to work for mountpoint labeled filesystems
(i.e. mount with option context=foo_t), as we are able to return the
kernel value to the user.
Signed-off-by: James Morris <jmorris@namei.org>
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/binfmt_elf_fdpic.c')
0 files changed, 0 insertions, 0 deletions