reg_sample1.c File Reference

#include <linux/config.h>
#include <linux/module.h>
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/string.h>
#include <linux/fs.h>
#include <rsbac/types.h>
#include <rsbac/reg.h>
#include <rsbac/adf.h>
#include <rsbac/aci.h>
#include <rsbac/getname.h>
#include <rsbac/error.h>
#include <rsbac/proc_fs.h>

Go to the source code of this file.

Functions

 MODULE_AUTHOR ("Amon Ott")
 MODULE_DESCRIPTION ("RSBAC REG sample decision module 1")
 MODULE_LICENSE ("GPL")
 MODULE_PARM (name,"s")
 MODULE_PARM (syscall_name,"s")
 MODULE_PARM (handle,"l")
 MODULE_PARM (syscall_registration_handle,"l")
 MODULE_PARM (syscall_dispatcher_handle,"l")
static int request_func (enum rsbac_adf_request_t request, rsbac_pid_t owner_pid, enum rsbac_target_t target, union rsbac_target_id_t tid, enum rsbac_attribute_t attr, union rsbac_attribute_value_t attr_val, rsbac_uid_t owner)
static int set_attr_func (enum rsbac_adf_request_t request, rsbac_pid_t owner_pid, enum rsbac_target_t target, union rsbac_target_id_t tid, enum rsbac_target_t new_target, union rsbac_target_id_t new_tid, enum rsbac_attribute_t attr, union rsbac_attribute_value_t attr_val, rsbac_uid_t owner)
static rsbac_boolean_t need_overwrite_func (struct dentry *dentry_p)
static int syscall_func (void *arg)
int init_module (void)
void cleanup_module (void)

Variables

static u_long nr_request_calls = 0
static u_long nr_set_attr_calls = 0
static u_long nr_need_overwrite_calls = 0
static u_long nr_system_calls = 0
static void * system_call_arg = NULL
static char * name = NULL
static char dummy_buf [70] = "To protect against wrong insmod params"
static char * syscall_name = NULL
static char dummy_buf2 [70] = "To protect against wrong insmod params"
static long handle = 123456
static long syscall_registration_handle = 654321
static long syscall_dispatcher_handle = 1


Function Documentation

void cleanup_module void   ) 
 

Definition at line 285 of file reg_sample1.c.

References handle, proc_rsbac_root_p, rsbac_reg_unregister(), rsbac_reg_unregister_syscall(), and syscall_registration_handle.

int init_module void   ) 
 

Definition at line 190 of file reg_sample1.c.

References dummy_buf, dummy_buf2, handle, name, need_overwrite_func(), proc_rsbac_root_p, request_func(), RSBAC_REG_NAME_LEN, rsbac_reg_register(), rsbac_reg_register_syscall(), rsbac_reg_unregister(), rsbac_reg_unregister_syscall(), RSBAC_REG_VERSION, set_attr_func(), syscall_dispatcher_handle, syscall_func(), syscall_name, syscall_registration_handle, and TRUE.

MODULE_AUTHOR "Amon Ott"   ) 
 

MODULE_DESCRIPTION "RSBAC REG sample decision module 1"   ) 
 

MODULE_LICENSE "GPL"   ) 
 

MODULE_PARM syscall_dispatcher_handle  ,
"l" 
 

MODULE_PARM syscall_registration_handle  ,
"l" 
 

MODULE_PARM handle  ,
"l" 
 

MODULE_PARM syscall_name  ,
"s" 
 

MODULE_PARM name  ,
"s" 
 

static rsbac_boolean_t need_overwrite_func struct dentry *  dentry_p  )  [static]
 

Definition at line 175 of file reg_sample1.c.

References FALSE, and nr_need_overwrite_calls.

Referenced by init_module().

static int request_func enum rsbac_adf_request_t  request,
rsbac_pid_t  owner_pid,
enum rsbac_target_t  target,
union rsbac_target_id_t  tid,
enum rsbac_attribute_t  attr,
union rsbac_attribute_value_t  attr_val,
rsbac_uid_t  owner
[static]
 

Definition at line 145 of file reg_sample1.c.

References GRANTED, nr_request_calls, and R_SEARCH.

static int set_attr_func enum rsbac_adf_request_t  request,
rsbac_pid_t  owner_pid,
enum rsbac_target_t  target,
union rsbac_target_id_t  tid,
enum rsbac_target_t  new_target,
union rsbac_target_id_t  new_tid,
enum rsbac_attribute_t  attr,
union rsbac_attribute_value_t  attr_val,
rsbac_uid_t  owner
[static]
 

Definition at line 159 of file reg_sample1.c.

References nr_set_attr_calls, and R_SEARCH.

Referenced by init_module().

static int syscall_func void *  arg  )  [static]
 

Definition at line 181 of file reg_sample1.c.

References nr_system_calls, and system_call_arg.

Referenced by init_module().


Variable Documentation

char dummy_buf[70] = "To protect against wrong insmod params" [static]
 

Definition at line 33 of file reg_sample1.c.

Referenced by init_module().

char dummy_buf2[70] = "To protect against wrong insmod params" [static]
 

Definition at line 37 of file reg_sample1.c.

Referenced by init_module().

long handle = 123456 [static]
 

Definition at line 40 of file reg_sample1.c.

char* name = NULL [static]
 

Definition at line 32 of file reg_sample1.c.

Referenced by acl_detach_fd_lists(), acl_register_fd_lists(), auth_detach_fd_lists(), auth_register_fd_lists(), group_name_compare(), init_module(), mac_detach_fd_lists(), mac_register_fd_lists(), name_compare(), read_info(), register_fd_lists(), rsbac_init_rc(), rsbac_init_um(), and write_info().

u_long nr_need_overwrite_calls = 0 [static]
 

Definition at line 23 of file reg_sample1.c.

Referenced by init_module(), need_overwrite_func(), read_info(), and write_info().

u_long nr_request_calls = 0 [static]
 

Definition at line 21 of file reg_sample1.c.

Referenced by init_module(), read_info(), request_func(), and write_info().

u_long nr_set_attr_calls = 0 [static]
 

Definition at line 22 of file reg_sample1.c.

Referenced by init_module(), read_info(), set_attr_func(), and write_info().

u_long nr_system_calls = 0 [static]
 

Definition at line 24 of file reg_sample1.c.

Referenced by init_module(), and syscall_func().

long syscall_dispatcher_handle = 1 [static]
 

Definition at line 45 of file reg_sample1.c.

Referenced by init_module().

char* syscall_name = NULL [static]
 

Definition at line 36 of file reg_sample1.c.

Referenced by init_module().

long syscall_registration_handle = 654321 [static]
 

Definition at line 43 of file reg_sample1.c.

Referenced by cleanup_module(), and init_module().

void* system_call_arg = NULL [static]
 

Definition at line 25 of file reg_sample1.c.

Referenced by syscall_func().


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