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

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

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