/daten/src/linux-2.4.27-rsbac-v1.2.3/rsbac/adf/daz/dazuko_xp.c File Reference

#include "dazuko_platform.h"
#include "dazuko_xp.h"
#include "dazukoio.h"
#include "dazuko_call.h"

Go to the source code of this file.

Data Structures

struct  path
struct  hash
struct  daemon_id
struct  slot
struct  slot_list
struct  slot_list_container
struct  one_slot_state_not_condition_param
struct  two_slot_state_not_condition_param
struct  get_ready_slot_condition_param

Defines

#define NUM_SLOT_LISTS   5
#define NUM_SLOTS   25
#define SCAN_ON_OPEN   (access_mask & DAZUKO_ON_OPEN)
#define SCAN_ON_CLOSE   (access_mask & DAZUKO_ON_CLOSE)
#define SCAN_ON_EXEC   (access_mask & DAZUKO_ON_EXEC)
#define SCAN_ON_CLOSE_MODIFIED   (access_mask & DAZUKO_ON_CLOSE_MODIFIED)
#define DAZUKO_VSNPRINTF_PRINTSTRING
#define DAZUKO_VSNPRINT(type, name)   dazuko_snprintf(request->reply_buffer + request->reply_buffer_size_used, (request->reply_buffer_size - request->reply_buffer_size_used) - 1, "%s%" #type , key, *((name *)value))

Functions

int dazuko_vsnprintf (char *str, size_t size, const char *format, va_list ap)
int dazuko_snprintf (char *str, size_t size, const char *format,...)
void dazuko_bzero (void *p, int len)
int dazuko_get_new_unique (void)
int dazuko_slot_state (struct slot *s)
int one_slot_state_not_condition (void *param)
int two_slot_state_not_condition (void *param)
int __dazuko_change_slot_state (struct slot *s, int from_state, int to_state)
int dazuko_change_slot_state (struct slot *s, int from_state, int to_state, int release)
slot_dazuko_find_slot (struct daemon_id *did, int release, struct slot_list *sl)
slotdazuko_find_slot_and_slotlist (struct daemon_id *did, int release, struct slot_list *slist, struct slot_list **sl_result)
slotdazuko_find_slot (struct daemon_id *did, int release, struct slot_list *slist)
int dazuko_insert_path_fs (struct path **list, char *fs_path, int fs_len)
void dazuko_remove_all_hash (void)
void dazuko_remove_all_paths (void)
int _dazuko_unregister_daemon (struct daemon_id *did)
int dazuko_unregister_daemon (struct xp_daemon_id *xp_id)
int dazuko_state_error (struct slot *s, int current_state)
int dazuko_register_daemon (struct daemon_id *did, const char *reg_name, int string_length, int write_mode)
slotdazuko_get_an_access (struct daemon_id *did)
int dazuko_return_access (struct daemon_id *did, int response, struct slot *s)
int dazuko_isdigit (const char c)
long dazuko_strtol (const char *string)
int dazuko_strlen (const char *string)
const char * dazuko_strchr (const char *haystack, char needle)
const char * dazuko_strstr (const char *haystack, const char *needle)
int dazuko_get_value (const char *key, const char *string, char **value)
void dazuko_clear_replybuffer (struct dazuko_request *request)
void dazuko_close_replybuffer (struct dazuko_request *request)
void dazuko_add_keyvalue_to_replybuffer (struct dazuko_request *request, const char *key, void *value, char vtype)
int dazuko_printable (char c)
void dazuko_add_esc_to_replybuffer (struct dazuko_request *request, const char *key, char **filename)
int dazuko_set_option (struct daemon_id *did, int opt, void *param, int len)
int dazuko_handle_request (struct dazuko_request *request, struct xp_daemon_id *xp_id)
int dazuko_handle_user_request (struct dazuko_request *user_request, struct xp_daemon_id *xp_id)
int dazuko_handle_user_request_compat12 (void *ptr, int cmd, struct xp_daemon_id *xp_id)
slotdazuko_get_and_hold_ready_slot (struct slot_list *sl)
int get_ready_slot_condition (void *param)
int dazuko_run_daemon_on_slotlist (int event, char *filename, int filenamelength, struct event_properties *event_p, struct file_properties *file_p, int prev_response, struct slot_list *sl)
int dazuko_run_daemon (int event, char *filename, int filenamelength, struct event_properties *event_p, struct file_properties *file_p)
int dazuko_is_our_daemon (struct xp_daemon_id *xp_id)
int dazuko_is_selected (char *filename, int len)
int dazuko_add_hash (struct xp_file *file, char *filename, int len)
void dazuko_mark_hash_dirty (struct xp_file *file)
hashdazuko_get_hash (struct xp_file *file)
int dazuko_get_filename_length (char *filename)
int dazuko_should_scan (struct dazuko_file_struct *kfs)
int dazuko_sys_check (unsigned long event, int daemon_is_allowed, struct xp_daemon_id *xp_id)
int dazuko_sys_pre (unsigned long event, struct dazuko_file_struct *kfs, struct event_properties *event_p)
int dazuko_sys_post (unsigned long event, struct dazuko_file_struct *kfs, struct xp_file *file, struct event_properties *event_p)
int dazuko_init (void)
int dazuko_exit (void)

Variables

int unique_count = 1
char access_mask = 7
slot_list_container slot_lists [NUM_SLOT_LISTS]
pathincl_paths = NULL
pathexcl_paths = NULL
hashhash = NULL
xp_rwlock lock_hash
xp_rwlock lock_lists
xp_atomic active
xp_mutex mutex_unique_count
xp_queue wait_kernel_waiting_for_free_slot
xp_queue wait_daemon_waiting_for_work
xp_queue wait_kernel_waiting_while_daemon_works
xp_queue wait_daemon_waiting_for_free


Define Documentation

#define DAZUKO_VSNPRINT type,
name   )     dazuko_snprintf(request->reply_buffer + request->reply_buffer_size_used, (request->reply_buffer_size - request->reply_buffer_size_used) - 1, "%s%" #type , key, *((name *)value))
 

Referenced by dazuko_add_keyvalue_to_replybuffer().

#define DAZUKO_VSNPRINTF_PRINTSTRING
 

Value:

for ( ; *s ; s++) \ { \ if (target == end) \ { \ overflow = 1; \ goto dazuko_vsnprintf_out; \ } \ *target = *s; \ target++; \ }

Referenced by dazuko_vsnprintf().

#define NUM_SLOT_LISTS   5
 

Definition at line 41 of file dazuko_xp.c.

Referenced by dazuko_exit(), dazuko_find_slot_and_slotlist(), dazuko_init(), dazuko_register_daemon(), and dazuko_run_daemon().

#define NUM_SLOTS   25
 

Definition at line 42 of file dazuko_xp.c.

Referenced by _dazuko_find_slot(), dazuko_exit(), dazuko_get_and_hold_ready_slot(), and dazuko_register_daemon().

#define SCAN_ON_CLOSE   (access_mask & DAZUKO_ON_CLOSE)
 

Definition at line 45 of file dazuko_xp.c.

Referenced by dazuko_sys_check(), and dazuko_sys_post().

#define SCAN_ON_CLOSE_MODIFIED   (access_mask & DAZUKO_ON_CLOSE_MODIFIED)
 

Definition at line 47 of file dazuko_xp.c.

Referenced by dazuko_sys_check(), and dazuko_sys_post().

#define SCAN_ON_EXEC   (access_mask & DAZUKO_ON_EXEC)
 

Definition at line 46 of file dazuko_xp.c.

#define SCAN_ON_OPEN   (access_mask & DAZUKO_ON_OPEN)
 

Definition at line 44 of file dazuko_xp.c.

Referenced by dazuko_sys_check(), dazuko_sys_post(), and dazuko_sys_pre().


Function Documentation

int __dazuko_change_slot_state struct slot s,
int  from_state,
int  to_state
[inline, static]
 

Definition at line 328 of file dazuko_xp.c.

References call_xp_notify(), DAZUKO_FREE, DAZUKO_READY, slot::did, slot::state, daemon_id::unique, wait_daemon_waiting_for_free, wait_kernel_waiting_for_free_slot, and wait_kernel_waiting_while_daemon_works.

Referenced by _dazuko_unregister_daemon(), dazuko_change_slot_state(), dazuko_register_daemon(), and dazuko_run_daemon_on_slotlist().

struct slot* _dazuko_find_slot struct daemon_id did,
int  release,
struct slot_list sl
[static]
 

Definition at line 386 of file dazuko_xp.c.

References call_xp_down(), call_xp_id_compare(), call_xp_print, call_xp_up(), NULL, NUM_SLOTS, slot_list::slots, daemon_id::unique, and daemon_id::xp_id.

Referenced by dazuko_find_slot_and_slotlist().

int _dazuko_unregister_daemon struct daemon_id did  )  [static]
 

Definition at line 631 of file dazuko_xp.c.

References __dazuko_change_slot_state(), active, call_xp_atomic_dec(), call_xp_atomic_read(), call_xp_id_free(), call_xp_notify(), call_xp_print, call_xp_up(), dazuko_find_slot_and_slotlist(), DAZUKO_FREE, dazuko_remove_all_hash(), dazuko_remove_all_paths(), DPRINT, NULL, daemon_id::unique, wait_kernel_waiting_for_free_slot, and wait_kernel_waiting_while_daemon_works.

Referenced by dazuko_set_option(), and dazuko_unregister_daemon().

void dazuko_add_esc_to_replybuffer struct dazuko_request request,
const char *  key,
char **  filename
[inline, static]
 

Definition at line 1222 of file dazuko_xp.c.

References dazuko_add_keyvalue_to_replybuffer(), dazuko_printable(), dazuko_snprintf(), dazuko_request::reply_buffer, dazuko_request::reply_buffer_size, and dazuko_request::reply_buffer_size_used.

Referenced by dazuko_handle_request().

int dazuko_add_hash struct xp_file file,
char *  filename,
int  len
[static]
 

Definition at line 2295 of file dazuko_xp.c.

References call_xp_copy_file(), call_xp_malloc(), call_xp_write_lock(), call_xp_write_unlock(), hash, lock_hash, and XP_ERROR_FAULT.

Referenced by dazuko_sys_post().

void dazuko_add_keyvalue_to_replybuffer struct dazuko_request request,
const char *  key,
void *  value,
char  vtype
[inline, static]
 

Definition at line 1186 of file dazuko_xp.c.

References DAZUKO_VSNPRINT, dazuko_request::reply_buffer, and dazuko_request::reply_buffer_size_used.

Referenced by dazuko_add_esc_to_replybuffer(), and dazuko_handle_request().

void dazuko_bzero void *  p,
int  len
[inline]
 

Definition at line 272 of file dazuko_xp.c.

Referenced by dazuko_clear_replybuffer(), dazuko_init(), dazuko_register_daemon(), dazuko_rsbac_process(), dazuko_run_daemon_on_slotlist(), linux_dazuko_device_read(), rsbac_adf_request_daz(), and rsbac_adf_set_attr_daz().

int dazuko_change_slot_state struct slot s,
int  from_state,
int  to_state,
int  release
[static]
 

Definition at line 360 of file dazuko_xp.c.

References __dazuko_change_slot_state(), call_xp_down(), call_xp_up(), and slot::mutex.

Referenced by dazuko_get_an_access(), dazuko_get_and_hold_ready_slot(), dazuko_return_access(), dazuko_run_daemon_on_slotlist(), and dazuko_state_error().

void dazuko_clear_replybuffer struct dazuko_request request  )  [inline, static]
 

Definition at line 1174 of file dazuko_xp.c.

References dazuko_bzero(), dazuko_request::reply_buffer, dazuko_request::reply_buffer_size, and dazuko_request::reply_buffer_size_used.

Referenced by dazuko_handle_request().

void dazuko_close_replybuffer struct dazuko_request request  )  [inline, static]
 

Definition at line 1180 of file dazuko_xp.c.

References dazuko_request::reply_buffer, and dazuko_request::reply_buffer_size_used.

Referenced by dazuko_handle_request().

int dazuko_exit void   )  [inline]
 

Definition at line 2744 of file dazuko_xp.c.

References active, call_xp_atomic_read(), call_xp_destroy_mutex(), call_xp_destroy_queue(), call_xp_destroy_rwlock(), call_xp_free(), call_xp_print, call_xp_sys_unhook, dazuko_remove_all_hash(), dazuko_remove_all_paths(), lock_hash, lock_lists, slot_list_container::mutex, mutex_unique_count, NULL, NUM_SLOT_LISTS, NUM_SLOTS, slot_list_container::slot_list, slot_lists, VERSION, wait_daemon_waiting_for_free, wait_daemon_waiting_for_work, wait_kernel_waiting_for_free_slot, and wait_kernel_waiting_while_daemon_works.

Referenced by linux_dazuko_exit().

struct slot* dazuko_find_slot struct daemon_id did,
int  release,
struct slot_list slist
[inline, static]
 

Definition at line 497 of file dazuko_xp.c.

References dazuko_find_slot_and_slotlist(), and NULL.

Referenced by dazuko_get_an_access(), dazuko_is_our_daemon(), dazuko_register_daemon(), dazuko_return_access(), and dazuko_set_option().

struct slot* dazuko_find_slot_and_slotlist struct daemon_id did,
int  release,
struct slot_list slist,
struct slot_list **  sl_result
[static]
 

Definition at line 454 of file dazuko_xp.c.

References _dazuko_find_slot(), call_xp_down(), call_xp_up(), NULL, NUM_SLOT_LISTS, slot_list_container::slot_list, and slot_lists.

Referenced by _dazuko_unregister_daemon(), and dazuko_find_slot().

struct slot* dazuko_get_an_access struct daemon_id did  )  [static]
 

Definition at line 893 of file dazuko_xp.c.

References call_xp_notify(), call_xp_print, call_xp_wait_until_condition(), DAZUKO_BROKEN, dazuko_change_slot_state(), dazuko_find_slot(), DAZUKO_READY, dazuko_register_daemon(), DAZUKO_WAITING, DAZUKO_WORKING, DPRINT, NULL, one_slot_state_not_condition(), one_slot_state_not_condition_param::slot, one_slot_state_not_condition_param::state, daemon_id::unique, wait_daemon_waiting_for_work, wait_kernel_waiting_for_free_slot, and wait_kernel_waiting_while_daemon_works.

Referenced by dazuko_handle_request(), and dazuko_handle_user_request_compat12().

struct slot* dazuko_get_and_hold_ready_slot struct slot_list sl  )  [static]
 

Definition at line 1990 of file dazuko_xp.c.

References dazuko_change_slot_state(), DAZUKO_READY, DAZUKO_WAITING, NULL, NUM_SLOTS, and slot_list::slots.

Referenced by get_ready_slot_condition().

int dazuko_get_filename_length char *  filename  )  [inline]
 

Definition at line 2453 of file dazuko_xp.c.

Referenced by xp_file_struct_check().

struct hash* dazuko_get_hash struct xp_file file  )  [static]
 

Definition at line 2415 of file dazuko_xp.c.

References call_xp_compare_file(), call_xp_write_lock(), call_xp_write_unlock(), hash, lock_hash, hash::next, and NULL.

Referenced by dazuko_sys_post().

int dazuko_get_new_unique void   )  [inline, static]
 

Definition at line 282 of file dazuko_xp.c.

References call_xp_down(), call_xp_up(), mutex_unique_count, and unique_count.

Referenced by dazuko_register_daemon().

int dazuko_get_value const char *  key,
const char *  string,
char **  value
 

Definition at line 1140 of file dazuko_xp.c.

References call_xp_malloc(), dazuko_strlen(), dazuko_strstr(), and NULL.

Referenced by dazuko_handle_request(), and linux_dazuko_device_write().

int dazuko_handle_request struct dazuko_request request,
struct xp_daemon_id xp_id
[static]
 

Definition at line 1367 of file dazuko_xp.c.

References access_mask, ADD_EXCLUDE_PATH, ADD_INCLUDE_PATH, dazuko_request::buffer, dazuko_request::buffer_size, call_xp_free(), call_xp_id_copy(), call_xp_id_free(), call_xp_print, call_xp_up(), dazuko_add_esc_to_replybuffer(), dazuko_add_keyvalue_to_replybuffer(), dazuko_clear_replybuffer(), dazuko_close_replybuffer(), dazuko_get_an_access(), dazuko_get_value(), dazuko_register_daemon(), dazuko_return_access(), dazuko_set_option(), dazuko_strchr(), dazuko_strlen(), dazuko_strtol(), GET_AN_ACCESS, NULL, REGISTER, REMOVE_ALL_PATHS, dazuko_request::reply_buffer_size, RETURN_AN_ACCESS, SET_ACCESS_MASK, dazuko_request::type, daemon_id::unique, UNREGISTER, XP_ERROR_INTERRUPT, and daemon_id::xp_id.

Referenced by dazuko_handle_user_request().

int dazuko_handle_user_request struct dazuko_request user_request,
struct xp_daemon_id xp_id
 

Definition at line 1652 of file dazuko_xp.c.

References call_xp_copyin(), call_xp_copyout(), call_xp_free(), call_xp_malloc(), dazuko_handle_request(), NULL, and XP_ERROR_FAULT.

Referenced by linux_dazuko_device_write().

int dazuko_handle_user_request_compat12 void *  ptr,
int  cmd,
struct xp_daemon_id xp_id
 

Definition at line 1775 of file dazuko_xp.c.

References call_xp_copyin(), call_xp_copyout(), call_xp_free(), call_xp_id_copy(), call_xp_id_free(), call_xp_malloc(), call_xp_print, call_xp_up(), call_xp_verify_user_readable(), call_xp_verify_user_writable(), DAZUKO_FILENAME_MAX_LENGTH_COMPAT12, dazuko_get_an_access(), dazuko_register_daemon(), dazuko_return_access(), dazuko_set_option(), dazuko_state_error(), DAZUKO_WORKING, IOCTL_GET_AN_ACCESS, IOCTL_RETURN_ACCESS, IOCTL_SET_OPTION, NULL, REGISTER, daemon_id::unique, XP_ERROR_FAULT, XP_ERROR_INTERRUPT, XP_ERROR_INVALID, and daemon_id::xp_id.

Referenced by linux_dazuko_device_ioctl().

int dazuko_init void   )  [inline]
 

Definition at line 2714 of file dazuko_xp.c.

References active, call_xp_atomic_set(), call_xp_init_mutex(), call_xp_init_queue(), call_xp_init_rwlock(), call_xp_print, call_xp_sys_hook, dazuko_bzero(), lock_hash, lock_lists, mutex_unique_count, NUM_SLOT_LISTS, slot_lists, VERSION, wait_daemon_waiting_for_free, wait_daemon_waiting_for_work, wait_kernel_waiting_for_free_slot, and wait_kernel_waiting_while_daemon_works.

Referenced by linux_dazuko_init(), and rsbac_init_daz().

int dazuko_insert_path_fs struct path **  list,
char *  fs_path,
int  fs_len
[static]
 

Definition at line 502 of file dazuko_xp.c.

References call_xp_free(), call_xp_is_absolute_path(), call_xp_malloc(), call_xp_write_lock(), call_xp_write_unlock(), DPRINT, incl_paths, lock_lists, path::next, NULL, XP_ERROR_FAULT, and XP_ERROR_INVALID.

Referenced by dazuko_set_option().

int dazuko_is_our_daemon struct xp_daemon_id xp_id  )  [inline]
 

Definition at line 2216 of file dazuko_xp.c.

References call_xp_id_copy(), call_xp_id_free(), dazuko_find_slot(), NULL, daemon_id::unique, and daemon_id::xp_id.

Referenced by dazuko_sys_check().

int dazuko_is_selected char *  filename,
int  len
[static]
 

Definition at line 2234 of file dazuko_xp.c.

References call_xp_read_lock(), call_xp_read_unlock(), excl_paths, incl_paths, lock_lists, and path::next.

Referenced by dazuko_should_scan().

int dazuko_isdigit const char  c  )  [inline, static]
 

Definition at line 1042 of file dazuko_xp.c.

Referenced by dazuko_strtol().

void dazuko_mark_hash_dirty struct xp_file file  )  [static]
 

Definition at line 2328 of file dazuko_xp.c.

References call_xp_compare_file(), call_xp_write_lock(), call_xp_write_unlock(), hash, lock_hash, hash::next, and NULL.

Referenced by dazuko_sys_post().

int dazuko_printable char  c  )  [inline, static]
 

Definition at line 1215 of file dazuko_xp.c.

Referenced by dazuko_add_esc_to_replybuffer().

int dazuko_register_daemon struct daemon_id did,
const char *  reg_name,
int  string_length,
int  write_mode
[static]
 

Definition at line 733 of file dazuko_xp.c.

References __dazuko_change_slot_state(), active, call_xp_atomic_inc(), call_xp_atomic_set(), call_xp_down(), call_xp_free(), call_xp_id_copy(), call_xp_init_mutex(), call_xp_malloc(), call_xp_print, call_xp_up(), dazuko_bzero(), dazuko_find_slot(), DAZUKO_FREE, dazuko_get_new_unique(), DPRINT, NULL, NUM_SLOT_LISTS, NUM_SLOTS, slot_list_container::slot_list, slot_lists, daemon_id::unique, XP_ERROR_BUSY, XP_ERROR_FAULT, XP_ERROR_INTERRUPT, XP_ERROR_PERMISSION, and daemon_id::xp_id.

Referenced by dazuko_get_an_access(), dazuko_handle_request(), dazuko_handle_user_request_compat12(), and dazuko_set_option().

void dazuko_remove_all_hash void   )  [static]
 

Definition at line 574 of file dazuko_xp.c.

References call_xp_free(), call_xp_write_lock(), call_xp_write_unlock(), DPRINT, hash, lock_hash, and hash::next.

Referenced by _dazuko_unregister_daemon(), and dazuko_exit().

void dazuko_remove_all_paths void   )  [static]
 

Definition at line 595 of file dazuko_xp.c.

References call_xp_free(), call_xp_write_lock(), call_xp_write_unlock(), DPRINT, excl_paths, incl_paths, lock_lists, and path::next.

Referenced by _dazuko_unregister_daemon(), dazuko_exit(), and dazuko_set_option().

int dazuko_return_access struct daemon_id did,
int  response,
struct slot s
[static]
 

Definition at line 975 of file dazuko_xp.c.

References call_xp_notify(), call_xp_up(), call_xp_wait_until_condition(), dazuko_change_slot_state(), DAZUKO_DONE, dazuko_find_slot(), DAZUKO_WORKING, DPRINT, slot::id, slot::mutex, NULL, one_slot_state_not_condition(), slot::response, one_slot_state_not_condition_param::slot, one_slot_state_not_condition_param::state, daemon_id::unique, wait_daemon_waiting_for_free, wait_kernel_waiting_while_daemon_works, XP_ERROR_INTERRUPT, and XP_ERROR_PERMISSION.

Referenced by dazuko_handle_request(), and dazuko_handle_user_request_compat12().

int dazuko_run_daemon int  event,
char *  filename,
int  filenamelength,
struct event_properties event_p,
struct file_properties file_p
[static]
 

Definition at line 2169 of file dazuko_xp.c.

References call_xp_down(), call_xp_up(), dazuko_run_daemon_on_slotlist(), NULL, NUM_SLOT_LISTS, slot_list_container::slot_list, slot_lists, event_properties::thrown, and XP_ERROR_INTERRUPT.

Referenced by dazuko_sys_post(), and dazuko_sys_pre().

int dazuko_run_daemon_on_slotlist int  event,
char *  filename,
int  filenamelength,
struct event_properties event_p,
struct file_properties file_p,
int  prev_response,
struct slot_list sl
[static]
 

Definition at line 2026 of file dazuko_xp.c.

References __dazuko_change_slot_state(), call_xp_down(), call_xp_notify(), call_xp_up(), call_xp_wait_until_condition(), dazuko_bzero(), dazuko_change_slot_state(), DAZUKO_DONE, DAZUKO_FREE, DAZUKO_WAITING, DAZUKO_WORKING, slot::did, DPRINT, get_ready_slot_condition(), NULL, event_properties::pid, get_ready_slot_condition_param::slot, two_slot_state_not_condition_param::slot1, two_slot_state_not_condition_param::slot2, get_ready_slot_condition_param::slotlist, two_slot_state_not_condition_param::state1, two_slot_state_not_condition_param::state2, two_slot_state_not_condition(), daemon_id::unique, wait_daemon_waiting_for_work, wait_kernel_waiting_for_free_slot, and wait_kernel_waiting_while_daemon_works.

Referenced by dazuko_run_daemon().

int dazuko_set_option struct daemon_id did,
int  opt,
void *  param,
int  len
[static]
 

Definition at line 1275 of file dazuko_xp.c.

References _dazuko_unregister_daemon(), access_mask, ADD_EXCLUDE_PATH, ADD_INCLUDE_PATH, call_xp_print, dazuko_find_slot(), dazuko_insert_path_fs(), dazuko_register_daemon(), dazuko_remove_all_paths(), excl_paths, incl_paths, NULL, REGISTER, REMOVE_ALL_PATHS, SET_ACCESS_MASK, daemon_id::unique, UNREGISTER, and XP_ERROR_PERMISSION.

Referenced by dazuko_handle_request(), and dazuko_handle_user_request_compat12().

int dazuko_should_scan struct dazuko_file_struct kfs  )  [static]
 

Definition at line 2462 of file dazuko_xp.c.

References call_xp_file_struct_check(), call_xp_file_struct_check_cleanup(), dazuko_is_selected(), dazuko_file_struct::filename, dazuko_file_struct::filename_length, and dazuko_file_struct::should_scan.

Referenced by dazuko_sys_post(), and dazuko_sys_pre().

int dazuko_slot_state struct slot s  )  [inline, static]
 

Definition at line 298 of file dazuko_xp.c.

References call_xp_down(), call_xp_up(), slot::mutex, slot::state, and XP_ERROR_INTERRUPT.

Referenced by one_slot_state_not_condition(), and two_slot_state_not_condition().

int dazuko_snprintf char *  str,
size_t  size,
const char *  format,
  ...
 

Definition at line 260 of file dazuko_xp.c.

References dazuko_vsnprintf().

Referenced by dazuko_add_esc_to_replybuffer(), and linux_dazuko_device_read().

int dazuko_state_error struct slot s,
int  current_state
[inline, static]
 

Definition at line 722 of file dazuko_xp.c.

References call_xp_notify(), DAZUKO_BROKEN, dazuko_change_slot_state(), wait_kernel_waiting_for_free_slot, and wait_kernel_waiting_while_daemon_works.

Referenced by dazuko_handle_user_request_compat12().

const char* dazuko_strchr const char *  haystack,
char  needle
[inline, static]
 

Definition at line 1100 of file dazuko_xp.c.

References NULL.

Referenced by dazuko_handle_request().

int dazuko_strlen const char *  string  )  [inline, static]
 

Definition at line 1087 of file dazuko_xp.c.

References NULL.

Referenced by dazuko_get_value(), and dazuko_handle_request().

const char* dazuko_strstr const char *  haystack,
const char *  needle
[inline, static]
 

Definition at line 1116 of file dazuko_xp.c.

References NULL.

Referenced by dazuko_get_value().

long dazuko_strtol const char *  string  )  [inline, static]
 

Definition at line 1047 of file dazuko_xp.c.

References dazuko_isdigit(), and NULL.

Referenced by dazuko_handle_request().

int dazuko_sys_check unsigned long  event,
int  daemon_is_allowed,
struct xp_daemon_id xp_id
[inline]
 

Definition at line 2519 of file dazuko_xp.c.

References access_mask, active, call_xp_atomic_read(), dazuko_is_our_daemon(), DAZUKO_ON_CLOSE, DAZUKO_ON_OPEN, SCAN_ON_CLOSE, SCAN_ON_CLOSE_MODIFIED, and SCAN_ON_OPEN.

Referenced by dazuko_rsbac_process(), rsbac_adf_request_daz(), and rsbac_adf_set_attr_daz().

int dazuko_sys_post unsigned long  event,
struct dazuko_file_struct kfs,
struct xp_file file,
struct event_properties event_p
[inline]
 

Definition at line 2634 of file dazuko_xp.c.

References active, call_xp_atomic_read(), call_xp_free(), dazuko_add_hash(), dazuko_get_hash(), dazuko_mark_hash_dirty(), DAZUKO_ON_CLOSE, DAZUKO_ON_CLOSE_MODIFIED, DAZUKO_ON_OPEN, dazuko_run_daemon(), dazuko_should_scan(), dazuko_file_struct::file_p, dazuko_file_struct::filename, dazuko_file_struct::filename_length, NULL, SCAN_ON_CLOSE, SCAN_ON_CLOSE_MODIFIED, and SCAN_ON_OPEN.

Referenced by dazuko_rsbac_process(), and rsbac_adf_set_attr_daz().

int dazuko_sys_pre unsigned long  event,
struct dazuko_file_struct kfs,
struct event_properties event_p
[inline]
 

Definition at line 2564 of file dazuko_xp.c.

References DAZUKO_ON_CLOSE, DAZUKO_ON_CLOSE_MODIFIED, DAZUKO_ON_OPEN, dazuko_run_daemon(), dazuko_should_scan(), dazuko_file_struct::file_p, dazuko_file_struct::filename, dazuko_file_struct::filename_length, NULL, SCAN_ON_OPEN, XP_ERROR_INTERRUPT, and XP_ERROR_PERMISSION.

Referenced by dazuko_rsbac_process(), and rsbac_adf_request_daz().

int dazuko_unregister_daemon struct xp_daemon_id xp_id  ) 
 

Definition at line 704 of file dazuko_xp.c.

References _dazuko_unregister_daemon(), call_xp_id_copy(), call_xp_id_free(), NULL, daemon_id::unique, and daemon_id::xp_id.

Referenced by linux_dazuko_device_release().

int dazuko_vsnprintf char *  str,
size_t  size,
const char *  format,
va_list  ap
 

Definition at line 148 of file dazuko_xp.c.

References DAZUKO_VSNPRINTF_PRINTSTRING, and NULL.

Referenced by dazuko_snprintf(), and xp_print().

int get_ready_slot_condition void *  param  )  [static]
 

Definition at line 2019 of file dazuko_xp.c.

References active, call_xp_atomic_read(), dazuko_get_and_hold_ready_slot(), and NULL.

Referenced by dazuko_run_daemon_on_slotlist().

int one_slot_state_not_condition void *  param  )  [static]
 

Definition at line 314 of file dazuko_xp.c.

References dazuko_slot_state().

Referenced by dazuko_get_an_access(), and dazuko_return_access().

int two_slot_state_not_condition void *  param  )  [static]
 

Definition at line 320 of file dazuko_xp.c.

References dazuko_slot_state().

Referenced by dazuko_run_daemon_on_slotlist().


Variable Documentation

char access_mask = 7 [static]
 

Definition at line 132 of file dazuko_xp.c.

Referenced by dazuko_handle_request(), dazuko_set_option(), and dazuko_sys_check().

struct xp_atomic active [static]
 

Definition at line 139 of file dazuko_xp.c.

struct path* excl_paths = NULL [static]
 

Definition at line 135 of file dazuko_xp.c.

Referenced by dazuko_is_selected(), dazuko_remove_all_paths(), and dazuko_set_option().

struct hash* hash = NULL [static]
 

Definition at line 136 of file dazuko_xp.c.

Referenced by dazuko_add_hash(), dazuko_get_hash(), dazuko_mark_hash_dirty(), and dazuko_remove_all_hash().

struct path* incl_paths = NULL [static]
 

Definition at line 134 of file dazuko_xp.c.

Referenced by dazuko_insert_path_fs(), dazuko_is_selected(), dazuko_remove_all_paths(), and dazuko_set_option().

struct xp_rwlock lock_hash [static]
 

Definition at line 137 of file dazuko_xp.c.

Referenced by dazuko_add_hash(), dazuko_exit(), dazuko_get_hash(), dazuko_init(), dazuko_mark_hash_dirty(), and dazuko_remove_all_hash().

struct xp_rwlock lock_lists [static]
 

Definition at line 138 of file dazuko_xp.c.

Referenced by dazuko_exit(), dazuko_init(), dazuko_insert_path_fs(), dazuko_is_selected(), and dazuko_remove_all_paths().

struct xp_mutex mutex_unique_count [static]
 

Definition at line 140 of file dazuko_xp.c.

Referenced by dazuko_exit(), dazuko_get_new_unique(), and dazuko_init().

struct slot_list_container slot_lists[NUM_SLOT_LISTS] [static]
 

Definition at line 133 of file dazuko_xp.c.

Referenced by dazuko_exit(), dazuko_find_slot_and_slotlist(), dazuko_init(), dazuko_register_daemon(), and dazuko_run_daemon().

int unique_count = 1 [static]
 

Definition at line 131 of file dazuko_xp.c.

Referenced by dazuko_get_new_unique().

struct xp_queue wait_daemon_waiting_for_free [static]
 

Definition at line 145 of file dazuko_xp.c.

Referenced by __dazuko_change_slot_state(), dazuko_exit(), dazuko_init(), and dazuko_return_access().

struct xp_queue wait_daemon_waiting_for_work [static]
 

Definition at line 143 of file dazuko_xp.c.

Referenced by dazuko_exit(), dazuko_get_an_access(), dazuko_init(), and dazuko_run_daemon_on_slotlist().

struct xp_queue wait_kernel_waiting_for_free_slot [static]
 

Definition at line 142 of file dazuko_xp.c.

Referenced by __dazuko_change_slot_state(), _dazuko_unregister_daemon(), dazuko_exit(), dazuko_get_an_access(), dazuko_init(), dazuko_run_daemon_on_slotlist(), and dazuko_state_error().

struct xp_queue wait_kernel_waiting_while_daemon_works [static]
 

Definition at line 144 of file dazuko_xp.c.

Referenced by __dazuko_change_slot_state(), _dazuko_unregister_daemon(), dazuko_exit(), dazuko_get_an_access(), dazuko_init(), dazuko_return_access(), dazuko_run_daemon_on_slotlist(), and dazuko_state_error().


Generated on Tue Aug 31 10:05:28 2004 for RSBAC by doxygen 1.3.8