[lkml]   [2009]   [Sep]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subject[PATCH] Security/sysfs: Enable security xattrs to be set on sysfs files, directories, and symlinks

This is revision three of the sysfs labeling patch set. Changes from version
two are that the new LSM hooks proposed in the last patch have been removed and
replaced with several hooks that were developed for labeled NFS. Instead of
storing the secid which Casey objected to it was replaced with the result of a
call to the new security_inode_getsecctx call. This call was developed to
handle the case where we may have a multiple xattr lsm. So in the new case
sysfs will make a call to getsecctx when the new xattr is set and this will
retreive all of the security information in one string. Subsequent inode
instantiations will take this value out of the sysfs dentry and use the new
security_inode_notifysecctx to place it into the sysfs inode. The third hook
setsecctx is there to round off the set and performs both the setting of incore
state and on disk value of the xattrs. This isn't used for sysfs because there
is no disk backing store for the inode.

fs/sysfs/dir.c | 1 +
fs/sysfs/inode.c | 135 ++++++++++++++++++++++++++++++++------------
fs/sysfs/symlink.c | 2 +
fs/sysfs/sysfs.h | 12 ++++-
fs/xattr.c | 55 ++++++++++++++----
include/linux/security.h | 55 ++++++++++++++++++
include/linux/xattr.h | 1 +
security/capability.c | 17 ++++++
security/security.c | 18 ++++++
security/selinux/hooks.c | 33 +++++++++++
security/smack/smack_lsm.c | 24 ++++++++
11 files changed, 303 insertions(+), 50 deletions(-)

 \ /
  Last update: 2009-09-03 20:49    [W:0.101 / U:33.020 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site