mac_data_structures.h

Go to the documentation of this file.
00001 /**************************************/
00002 /* Rule Set Based Access Control      */
00003 /* Author and (c) 1999-2004:          */
00004 /*   Amon Ott <ao@rsbac.org> */
00005 /* Data structures / MAC              */
00006 /* Last modified: 14/Apr/2004         */
00007 /**************************************/
00008 
00009 #ifndef __RSBAC_MAC_DATA_STRUC_H
00010 #define __RSBAC_MAC_DATA_STRUC_H
00011 
00012 #include <linux/types.h>
00013 #include <rsbac/aci.h>
00014 #include <rsbac/types.h>
00015 
00016 /**********************************************/
00017 /* Capability lists                           */
00018 /**********************************************/
00019 
00020 #define RSBAC_MAC_LIST_KEY 626281
00021 
00022 #define RSBAC_MAC_P_LIST_VERSION 1
00023 #define RSBAC_MAC_P_LIST_NAME "macptru"
00024 
00025 #define RSBAC_MAC_FD_FILENAME "macfdtru."
00026 #define RSBAC_MAC_NR_TRU_FD_LISTS 4
00027 #define RSBAC_MAC_FD_LIST_VERSION 1
00028 
00029 /* The list of devices is also a double linked list, so we define list    */
00030 /* items and a list head.                                                 */
00031 
00032 struct rsbac_mac_device_list_item_t
00033     {
00034       kdev_t                                   id;  /* set to 0 before deletion */
00035       u_int                                 mount_count;
00036       rsbac_list_handle_t                   handles[RSBAC_MAC_NR_TRU_FD_LISTS];
00037       struct rsbac_mac_device_list_item_t   * prev;
00038       struct rsbac_mac_device_list_item_t   * next;
00039     };
00040     
00041 /* To provide consistency we use spinlocks for all list accesses. The     */
00042 /* 'curr' entry is used to avoid repeated lookups for the same item.       */    
00043     
00044 struct rsbac_mac_device_list_head_t
00045     {
00046       struct rsbac_mac_device_list_item_t * head;
00047       struct rsbac_mac_device_list_item_t * tail;
00048       struct rsbac_mac_device_list_item_t * curr;
00049       rwlock_t                               lock;
00050       u_int                                  count;
00051     };
00052 
00053 #endif

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