From: serue@us.ibm.com
To: lkml <linux-kernel@vger.kernel.org>
Cc: Chris Wright <chrisw@osdl.org>,
Stephen Smalley <sds@epoch.ncsc.mil>,
James Morris <jmorris@redhat.com>
Subject: [patch 7/11] lsm stacking: selinux: update ->security structs
Date: Wed, 8 Jun 2005 19:01:33 -0500 [thread overview]
Message-ID: <20050609000133.GG27314@serge.austin.ibm.com> (raw)
In-Reply-To: <20050608235505.GA27298@serge.austin.ibm.com>
Add the struct security_list lsm_list; to each structure which SELinux will be
appending to a kernel object.
Signed-off-by: Serge Hallyn <serue@us.ibm.com>
---
security/selinux/include/objsec.h | 19 +++++++++++--------
1 files changed, 11 insertions(+), 8 deletions(-)
Index: linux-2.6.12-rc2-stack/security/selinux/include/objsec.h
===================================================================
--- linux-2.6.12-rc2-stack.orig/security/selinux/include/objsec.h 2005-04-13 14:17:33.000000000 -0500
+++ linux-2.6.12-rc2-stack/security/selinux/include/objsec.h 2005-04-13 14:38:41.000000000 -0500
@@ -23,11 +23,14 @@
#include <linux/fs.h>
#include <linux/binfmts.h>
#include <linux/in.h>
+#include <linux/security.h>
#include "flask.h"
#include "avc.h"
+#define SELINUX_LSM_ID 0xB65
+
struct task_security_struct {
- unsigned long magic; /* magic number for this module */
+ struct security_list lsm_list; /* chained security objects */
struct task_struct *task; /* back pointer to task object */
u32 osid; /* SID prior to last execve */
u32 sid; /* current SID */
@@ -37,7 +40,7 @@ struct task_security_struct {
};
struct inode_security_struct {
- unsigned long magic; /* magic number for this module */
+ struct security_list lsm_list; /* chained security objects */
struct inode *inode; /* back pointer to inode object */
struct list_head list; /* list of inode_security_struct */
u32 task_sid; /* SID of creating task */
@@ -49,14 +52,14 @@ struct inode_security_struct {
};
struct file_security_struct {
- unsigned long magic; /* magic number for this module */
+ struct security_list lsm_list; /* chained security objects */
struct file *file; /* back pointer to file object */
u32 sid; /* SID of open file description */
u32 fown_sid; /* SID of file owner (for SIGIO) */
};
struct superblock_security_struct {
- unsigned long magic; /* magic number for this module */
+ struct security_list lsm_list; /* chained security objects */
struct super_block *sb; /* back pointer to sb object */
struct list_head list; /* list of superblock_security_struct */
u32 sid; /* SID of file system */
@@ -70,20 +73,20 @@ struct superblock_security_struct {
};
struct msg_security_struct {
- unsigned long magic; /* magic number for this module */
+ struct security_list lsm_list; /* chained security objects */
struct msg_msg *msg; /* back pointer */
u32 sid; /* SID of message */
};
struct ipc_security_struct {
- unsigned long magic; /* magic number for this module */
+ struct security_list lsm_list; /* chained security objects */
struct kern_ipc_perm *ipc_perm; /* back pointer */
u16 sclass; /* security class of this object */
u32 sid; /* SID of IPC resource */
};
struct bprm_security_struct {
- unsigned long magic; /* magic number for this module */
+ struct security_list lsm_list; /* chained security objects */
struct linux_binprm *bprm; /* back pointer to bprm object */
u32 sid; /* SID for transformed process */
unsigned char set;
@@ -102,7 +105,7 @@ struct netif_security_struct {
};
struct sk_security_struct {
- unsigned long magic; /* magic number for this module */
+ struct security_list lsm_list; /* chained security objects */
struct sock *sk; /* back pointer to sk object */
u32 peer_sid; /* SID of peer */
};
next prev parent reply other threads:[~2005-06-09 0:40 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-08 23:55 patch 0/11] lsm stacking: intro serue
2005-06-08 23:56 ` [patch 1/11] lsm stacking: don't default to dummy_##hook serue
2005-06-08 23:57 ` [patch 2/11] lsm stacking: replace void* security with hlist serue
2005-06-08 23:58 ` [patch 3/11] lsm stacking: introduce security_*_value API serue
2005-06-08 23:59 ` [patch 4/11] lsm stacking: stacker documentation serue
2005-06-09 0:00 ` [patch 5/11] lsm stacking: actual stacker module serue
2005-06-09 0:00 ` [patch 6/11] lsm stacking: introduce stackable capabilities lsm serue
2005-06-09 0:01 ` serue [this message]
2005-06-09 0:02 ` [patch 8/11] lsm stacking: selinux: use security_*_value API serue
2005-06-09 0:02 ` [patch 9/11] lsm stacking: selinux: remove secondary support serue
2005-06-09 0:03 ` [patch 10/11] lsm stacking: hook completeness verification serue
2005-06-09 0:04 ` [patch 11/11] lsm stacking: support sharing /proc/$$/attr/* serue
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050609000133.GG27314@serge.austin.ibm.com \
--to=serue@us.ibm.com \
--cc=chrisw@osdl.org \
--cc=jmorris@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sds@epoch.ncsc.mil \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®