/daten/src/linux-2.4.27-rsbac-v1.2.3/rsbac/adf/daz/dazuko_rsbac.h

Go to the documentation of this file.
00001 /* Dazuko RSBAC. Allow RSBAC Linux file access control for 3rd-party applications. 00002 Copyright (c) 2004 H+BEDV Datentechnik GmbH 00003 Written by John Ogness <jogness@antivir.de> 00004 00005 This program is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU General Public License 00007 as published by the Free Software Foundation; either version 2 00008 of the License, or (at your option) any later version. 00009 00010 This program is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 GNU General Public License for more details. 00014 00015 You should have received a copy of the GNU General Public License 00016 along with this program; if not, write to the Free Software 00017 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00018 */ 00019 00020 #ifndef DAZUKO_RSBAC_H 00021 #define DAZUKO_RSBAC_H 00022 00023 #if CONFIG_MODVERSIONS==1 00024 #define MODVERSIONS 00025 #include <linux/modversions.h> 00026 #endif 00027 00028 #include <linux/kernel.h> 00029 #include <linux/version.h> 00030 00031 #ifdef MODULE 00032 #include <linux/module.h> 00033 #endif 00034 00035 #ifndef KERNEL_VERSION 00036 #define KERNEL_VERSION(a,b,c) ((a)*65536+(b)*256+(c)) 00037 #endif 00038 00039 #include <linux/slab.h> 00040 #include <asm/atomic.h> 00041 00042 #ifdef CONFIG_SMP 00043 #ifndef __SMP__ 00044 #define __SMP__ 00045 #endif 00046 #endif 00047 00048 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) 00049 #ifdef __SMP__ 00050 #include <asm/smplock.h> 00051 #endif 00052 00053 #else 00054 #include <asm/semaphore.h> 00055 #endif 00056 00057 00058 #define DEVICE_NAME "dazuko" 00059 00060 #define XP_ERROR_PERMISSION -EPERM; 00061 #define XP_ERROR_INTERRUPT -EINTR; 00062 #define XP_ERROR_BUSY -EBUSY; 00063 #define XP_ERROR_FAULT -EFAULT; 00064 #define XP_ERROR_INVALID -EINVAL; 00065 00066 00067 struct xp_daemon_id 00068 { 00069 int pid; 00070 struct file *file; 00071 }; 00072 00073 struct xp_file 00074 { 00075 char c; 00076 }; 00077 00078 struct xp_mutex 00079 { 00080 struct semaphore mutex; 00081 }; 00082 00083 struct xp_atomic 00084 { 00085 atomic_t atomic; 00086 }; 00087 00088 struct xp_file_struct 00089 { 00090 int full_filename_length; /* length of filename */ 00091 char *full_filename; /* kernelspace filename with full path */ 00092 int free_full_filename; /* flag to clean up full_filename */ 00093 struct dentry *dentry; /* used to get inode */ 00094 }; 00095 00096 struct xp_queue 00097 { 00098 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0) 00099 wait_queue_head_t queue; 00100 #else 00101 struct wait_queue *queue; 00102 #endif 00103 }; 00104 00105 struct xp_rwlock 00106 { 00107 rwlock_t rwlock; 00108 }; 00109 00110 #endif

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