lkml.org 
[lkml]   [2005]   [Jun]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[patch 7/11] lsm stacking: selinux: update ->security structs
    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 */
    };
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/
    \
     
     \ /
      Last update: 2005-06-09 02:47    [W:0.037 / U:30.224 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site