lsm.c File Reference

#include <linux/types.h>
#include <linux/version.h>
#include <linux/security.h>
#include <linux/ptrace.h>
#include <linux/fs.h>
#include <linux/mount.h>
#include <linux/namei.h>
#include <net/sock.h>
#include <rsbac/types.h>
#include <rsbac/adf.h>
#include <rsbac/aci.h>

Go to the source code of this file.

Functions

static int rsbac_aef_ptrace (struct task_struct *parent, struct task_struct *child)
static int rsbac_aef_statfs (struct super_block *sb)
static int rsbac_aef_inode_follow_link (struct dentry *dentry, struct nameidata *nd)
static int rsbac_aef_inode_create (struct inode *dir, struct dentry *dentry, int mode)
static void rsbac_aef_inode_post_create (struct inode *dir, struct dentry *dentry, int mode)
static int rsbac_aef_inode_mknod (struct inode *dir, struct dentry *dentry, int mode, dev_t dev)
static void rsbac_aef_inode_post_mknod (struct inode *dir, struct dentry *dentry, int mode, dev_t dev)
static int rsbac_aef_inode_mkdir (struct inode *dir, struct dentry *dentry, int mode)
static void rsbac_aef_inode_post_mkdir (struct inode *dir, struct dentry *dentry, int mode)
static int rsbac_aef_inode_symlink (struct inode *dir, struct dentry *dentry, const char *old_name)
static void rsbac_aef_inode_post_symlink (struct inode *dir, struct dentry *dentry, const char *old_name)
static int rsbac_aef_inode_link (struct dentry *old_dentry, struct inode *dir, struct dentry *new_dentry)
static int rsbac_aef_inode_rename (struct inode *old_dir, struct dentry *old_dentry, struct inode *new_dir, struct dentry *new_dentry)
static int rsbac_aef_sb_umount (struct vfsmount *mnt, int flags)
static void rsbac_aef_sb_umount_busy (struct vfsmount *mnt)
static void rsbac_aef_sb_post_addmount (struct vfsmount *mnt, struct nameidata *mountpoint_nd)
static int rsbac_aef_sb_mount (char *dev_name, struct nameidata *nd, char *type, unsigned long flags, void *data)
static int rsbac_aef_sb_pivotroot (struct nameidata *old_nd, struct nameidata *new_nd)
static int rsbac_aef_inode_getattr (struct vfsmount *mnt, struct dentry *dentry)
static int rsbac_aef_inode_readlink (struct dentry *dentry)
static int rsbac_aef_file_permission (struct file *file, int mask)
static int rsbac_aef_task_setgid (gid_t id0, gid_t id1, gid_t id2, int flags)
static int rsbac_aef_task_setuid (uid_t id0, uid_t id1, uid_t id2, int flags)
static int rsbac_aef_task_setgroups (int gidsetsize, gid_t *grouplist)
static int rsbac_aef_task_setrlimit (unsigned int resource, struct rlimit *new_rlim)
static int rsbac_aef_task_kill (struct task_struct *p, struct siginfo *info, int sig)
static int rsbac_aef_sysctl (ctl_table *table, int op)
static int rsbac_aef_msg_queue_alloc_security (struct msg_queue *msq)
static void rsbac_aef_shm_free_security (struct shmid_kernel *shp)
static int rsbac_aef_shm_alloc_security (struct shmid_kernel *shp)
static int rsbac_aef_shm_shmat (struct shmid_kernel *shp, char *shmaddr, int shmflg)
int rsbac_lsm_register (void)

Variables

static struct security_operations rsbac_sec_ops


Function Documentation

static int rsbac_aef_file_permission struct file *  file,
int  mask
[static]
 

Definition at line 642 of file lsm.c.

References A_none, D_block, D_char, rsbac_attribute_value_t::dummy, rsbac_net_obj_desc_t::local_addr, rsbac_net_obj_desc_t::local_len, rsbac_target_id_t::netobj, NULL, R_READ, R_WRITE, rsbac_net_obj_desc_t::remote_addr, rsbac_net_obj_desc_t::remote_len, rsbac_adf_request(), rsbac_net_obj_desc_t::sock_p, T_DEV, T_DIR, T_FIFO, T_FILE, T_NETOBJ, and T_NONE.

static int rsbac_aef_inode_create struct inode *  dir,
struct dentry *  dentry,
int  mode
[static]
 

Definition at line 90 of file lsm.c.

References R_CREATE, rsbac_adf_request(), T_DIR, and T_FILE.

static int rsbac_aef_inode_follow_link struct dentry *  dentry,
struct nameidata *  nd
[static]
 

Definition at line 66 of file lsm.c.

References A_none, rsbac_attribute_value_t::dummy, R_SEARCH, rsbac_adf_request(), and T_SYMLINK.

static int rsbac_aef_inode_getattr struct vfsmount *  mnt,
struct dentry *  dentry
[static]
 

Definition at line 586 of file lsm.c.

References A_none, rsbac_attribute_value_t::dummy, R_GET_STATUS_DATA, rsbac_adf_request(), T_DIR, T_FIFO, T_FILE, and T_SYMLINK.

static int rsbac_aef_inode_link struct dentry *  old_dentry,
struct inode *  dir,
struct dentry *  new_dentry
[static]
 

Definition at line 348 of file lsm.c.

References A_none, rsbac_attribute_value_t::dummy, R_LINK_HARD, rsbac_adf_request(), T_DIR, T_FIFO, T_FILE, and T_SYMLINK.

static int rsbac_aef_inode_mkdir struct inode *  dir,
struct dentry *  dentry,
int  mode
[static]
 

Definition at line 218 of file lsm.c.

References R_CREATE, rsbac_adf_request(), T_DIR, and T_FILE.

static int rsbac_aef_inode_mknod struct inode *  dir,
struct dentry *  dentry,
int  mode,
dev_t  dev
[static]
 

Definition at line 155 of file lsm.c.

References R_CREATE, rsbac_adf_request(), T_DIR, and T_FILE.

static void rsbac_aef_inode_post_create struct inode *  dir,
struct dentry *  dentry,
int  mode
[static]
 

Definition at line 119 of file lsm.c.

References R_CREATE, rsbac_adf_set_attr(), T_DIR, and T_FILE.

static void rsbac_aef_inode_post_mkdir struct inode *  dir,
struct dentry *  dentry,
int  mode
[static]
 

Definition at line 247 of file lsm.c.

References R_CREATE, rsbac_adf_set_attr(), T_DIR, and T_FILE.

static void rsbac_aef_inode_post_mknod struct inode *  dir,
struct dentry *  dentry,
int  mode,
dev_t  dev
[static]
 

Definition at line 183 of file lsm.c.

References R_CREATE, rsbac_adf_set_attr(), T_DIR, and T_FILE.

static void rsbac_aef_inode_post_symlink struct inode *  dir,
struct dentry *  dentry,
const char *  old_name
[static]
 

Definition at line 312 of file lsm.c.

References R_CREATE, rsbac_adf_set_attr(), T_DIR, T_FILE, and T_SYMLINK.

static int rsbac_aef_inode_readlink struct dentry *  dentry  )  [static]
 

Definition at line 618 of file lsm.c.

References A_none, rsbac_attribute_value_t::dummy, R_GET_STATUS_DATA, rsbac_adf_request(), and T_SYMLINK.

static int rsbac_aef_inode_rename struct inode *  old_dir,
struct dentry *  old_dentry,
struct inode *  new_dir,
struct dentry *  new_dentry
[static]
 

Definition at line 382 of file lsm.c.

References A_none, rsbac_attribute_value_t::dummy, R_RENAME, R_WRITE, rsbac_adf_request(), T_DIR, T_FIFO, T_FILE, and T_SYMLINK.

static int rsbac_aef_inode_symlink struct inode *  dir,
struct dentry *  dentry,
const char *  old_name
[static]
 

Definition at line 283 of file lsm.c.

References R_CREATE, rsbac_adf_request(), T_DIR, and T_SYMLINK.

static int rsbac_aef_msg_queue_alloc_security struct msg_queue *  msq  )  [static]
 

Definition at line 1041 of file lsm.c.

References A_none, rsbac_attribute_value_t::dummy, I_msg, rsbac_ipc_t::id, rsbac_ipc_id_t::id_nr, rsbac_target_id_t::ipc, R_CREATE, rsbac_adf_request(), T_IPC, and rsbac_ipc_t::type.

static int rsbac_aef_ptrace struct task_struct *  parent,
struct task_struct *  child
[static]
 

Definition at line 21 of file lsm.c.

References rsbac_target_id_t::process, R_TRACE, rsbac_adf_request(), and T_PROCESS.

static int rsbac_aef_sb_mount char *  dev_name,
struct nameidata *  nd,
char *  type,
unsigned long  flags,
void *  data
[static]
 

Definition at line 505 of file lsm.c.

References A_none, D_block, rsbac_attribute_value_t::dummy, R_MOUNT, rsbac_adf_request(), T_DEV, and T_DIR.

static int rsbac_aef_sb_pivotroot struct nameidata *  old_nd,
struct nameidata *  new_nd
[static]
 

Definition at line 545 of file lsm.c.

References A_none, rsbac_attribute_value_t::dummy, R_MOUNT, rsbac_adf_request(), and T_DIR.

static void rsbac_aef_sb_post_addmount struct vfsmount *  mnt,
struct nameidata *  mountpoint_nd
[static]
 

Definition at line 492 of file lsm.c.

References rsbac_mount().

static int rsbac_aef_sb_umount struct vfsmount *  mnt,
int  flags
[static]
 

Definition at line 431 of file lsm.c.

References A_none, D_block, rsbac_attribute_value_t::dummy, R_UMOUNT, rsbac_adf_request(), rsbac_umount(), T_DEV, and T_DIR.

static void rsbac_aef_sb_umount_busy struct vfsmount *  mnt  )  [static]
 

Definition at line 480 of file lsm.c.

References rsbac_mount().

static int rsbac_aef_shm_alloc_security struct shmid_kernel *  shp  )  [static]
 

Definition at line 1077 of file lsm.c.

References A_none, rsbac_attribute_value_t::dummy, I_shm, rsbac_ipc_t::id, rsbac_ipc_id_t::id_nr, rsbac_target_id_t::ipc, R_CREATE, rsbac_adf_request(), T_IPC, and rsbac_ipc_t::type.

static void rsbac_aef_shm_free_security struct shmid_kernel *  shp  )  [static]
 

Definition at line 1064 of file lsm.c.

References I_shm, rsbac_ipc_t::id, rsbac_ipc_id_t::id_nr, rsbac_target_id_t::ipc, rsbac_remove_target, T_IPC, and rsbac_ipc_t::type.

static int rsbac_aef_shm_shmat struct shmid_kernel *  shp,
char *  shmaddr,
int  shmflg
[static]
 

Definition at line 1100 of file lsm.c.

References A_none, rsbac_attribute_value_t::dummy, I_shm, rsbac_ipc_t::id, rsbac_ipc_id_t::id_nr, rsbac_target_id_t::ipc, R_READ_OPEN, R_READ_WRITE_OPEN, rsbac_adf_request(), T_IPC, and rsbac_ipc_t::type.

static int rsbac_aef_statfs struct super_block *  sb  )  [static]
 

Definition at line 43 of file lsm.c.

References A_none, D_block, rsbac_attribute_value_t::dummy, R_GET_STATUS_DATA, rsbac_adf_request(), and T_DEV.

static int rsbac_aef_sysctl ctl_table *  table,
int  op
[static]
 

Definition at line 1007 of file lsm.c.

References rsbac_attribute_value_t::dummy, R_MODIFY_SYSTEM_DATA, rsbac_adf_request(), rsbac_target_id_t::scd, ST_host_id, ST_net_id, ST_other, and T_SCD.

static int rsbac_aef_task_kill struct task_struct *  p,
struct siginfo *  info,
int  sig
[static]
 

Definition at line 932 of file lsm.c.

References rsbac_target_id_t::process, R_SEND_SIGNAL, rsbac_adf_request(), and T_PROCESS.

static int rsbac_aef_task_setgid gid_t  id0,
gid_t  id1,
gid_t  id2,
int  flags
[static]
 

Definition at line 732 of file lsm.c.

References rsbac_target_id_t::process, R_CHANGE_GROUP, rsbac_adf_request(), and T_PROCESS.

static int rsbac_aef_task_setgroups int  gidsetsize,
gid_t *  grouplist
[static]
 

Definition at line 888 of file lsm.c.

References A_none, rsbac_attribute_value_t::dummy, rsbac_target_id_t::process, R_CHANGE_GROUP, rsbac_adf_request(), and T_PROCESS.

static int rsbac_aef_task_setrlimit unsigned int  resource,
struct rlimit *  new_rlim
[static]
 

Definition at line 910 of file lsm.c.

References A_none, rsbac_attribute_value_t::dummy, R_MODIFY_SYSTEM_DATA, rsbac_adf_request(), rsbac_target_id_t::scd, ST_rlimit, and T_SCD.

static int rsbac_aef_task_setuid uid_t  id0,
uid_t  id1,
uid_t  id2,
int  flags
[static]
 

Definition at line 769 of file lsm.c.

References rsbac_attribute_value_t::owner, rsbac_target_id_t::process, R_CHANGE_DAC_EFF_OWNER, R_CHANGE_DAC_FS_OWNER, R_CHANGE_OWNER, R_GET_STATUS_DATA, rsbac_adf_request(), and T_PROCESS.

int rsbac_lsm_register void   ) 
 

Definition at line 1276 of file lsm.c.


Variable Documentation

struct security_operations rsbac_sec_ops [static]
 

Definition at line 1231 of file lsm.c.


Generated on Fri Jun 17 09:45:30 2005 for RSBAC by  doxygen 1.4.2