public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Security/sysfs: Enable security xattrs to be set on sysfs files, directories, and symlinks
@ 2009-09-03 18:25 David P. Quigley
  2009-09-03 18:25 ` [PATCH 1/3] VFS: Factor out part of vfs_setxattr so it can be called from the SELinux hook for inode_setsecctx David P. Quigley
                   ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: David P. Quigley @ 2009-09-03 18:25 UTC (permalink / raw)
  To: sds, jmorris, casey, gregkh, ebiederm; +Cc: linux-kernel, linux-security-module


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(-)
 

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

end of thread, other threads:[~2009-09-11  4:27 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-03 18:25 [PATCH] Security/sysfs: Enable security xattrs to be set on sysfs files, directories, and symlinks David P. Quigley
2009-09-03 18:25 ` [PATCH 1/3] VFS: Factor out part of vfs_setxattr so it can be called from the SELinux hook for inode_setsecctx David P. Quigley
2009-09-04 15:31   ` Serge E. Hallyn
2009-09-03 18:25 ` [PATCH 2/3] LSM/SELinux: inode_{get,set,notify}secctx hooks to access LSM security context information David P. Quigley
2009-09-04 15:49   ` Serge E. Hallyn
2009-09-04 16:21     ` Stephen Smalley
2009-09-03 18:25 ` [PATCH 3/3] sysfs: Add labeling support for sysfs David P. Quigley
2009-09-04 16:03   ` Serge E. Hallyn
2009-09-07  1:48   ` James Morris
2009-09-09 18:25     ` Stephen Smalley
2009-09-10  0:40       ` James Morris
2009-09-10  3:01         ` Greg KH
2009-09-10  3:48           ` Casey Schaufler
2009-09-10 12:14             ` Stephen Smalley
2009-09-10 10:31           ` James Morris
2009-09-11  4:17           ` Casey Schaufler
2009-09-11  4:25             ` Greg KH

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