diff options
| author | David P. Quigley <[email protected]> | 2008-02-05 06:29:40 +0000 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2008-02-05 17:44:20 +0000 |
| commit | 4bea58053f206be9a89ca35850f9ad295dac2042 (patch) | |
| tree | 50df31f6b7e8d38ac0988a523e331babb6462216 /fs/proc/array.c | |
| parent | VFS/Security: Rework inode_getsecurity and callers to return resulting buffer (diff) | |
| download | kernel-4bea58053f206be9a89ca35850f9ad295dac2042.tar.gz kernel-4bea58053f206be9a89ca35850f9ad295dac2042.zip | |
VFS: Reorder vfs_getxattr to avoid unnecessary calls to the LSM
Originally vfs_getxattr would pull the security xattr variable using
the inode getxattr handle and then proceed to clobber it with a subsequent call
to the LSM.
This patch reorders the two operations such that when the xattr requested is
in the security namespace it first attempts to grab the value from the LSM
directly.
If it fails to obtain the value because there is no module present or the
module does not support the operation it will fall back to using the inode
getxattr operation.
In the event that both are inaccessible it returns EOPNOTSUPP.
Signed-off-by: David P. Quigley <[email protected]>
Cc: Stephen Smalley <[email protected]>
Cc: Chris Wright <[email protected]>
Acked-by: James Morris <[email protected]>
Acked-by: Serge Hallyn <[email protected]>
Cc: Casey Schaufler <[email protected]>
Cc: Al Viro <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'fs/proc/array.c')
0 files changed, 0 insertions, 0 deletions
