00001 /* Dazuko Linux. Allow Linux 2.6 file access control for 3rd-party applications. 00002 Copyright (c) 2003, 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_LINUX26_H 00021 #define DAZUKO_LINUX26_H 00022 00023 #include <linux/module.h> 00024 #include <asm/semaphore.h> 00025 00026 #define DEVICE_NAME "dazuko" 00027 00028 #define XP_ERROR_PERMISSION -EPERM; 00029 #define XP_ERROR_INTERRUPT -EINTR; 00030 #define XP_ERROR_BUSY -EBUSY; 00031 #define XP_ERROR_FAULT -EFAULT; 00032 #define XP_ERROR_INVALID -EINVAL; 00033 #define XP_ERROR_NODEVICE -ENODEV; 00034 00035 00036 struct xp_daemon_id 00037 { 00038 int pid; 00039 struct file *file; 00040 }; 00041 00042 struct xp_file 00043 { 00044 char file; 00045 }; 00046 00047 struct xp_mutex 00048 { 00049 struct semaphore mutex; 00050 }; 00051 00052 struct xp_atomic 00053 { 00054 atomic_t atomic; 00055 }; 00056 00057 struct xp_file_struct 00058 { 00059 int full_filename_length; 00060 char *full_filename; 00061 int free_full_filename; 00062 struct dentry *dentry; 00063 int dput_dentry; 00064 char *buffer; 00065 int free_page_buffer; 00066 struct nameidata *nd; 00067 struct vfsmount *vfsmount; 00068 int mntput_vfsmount; 00069 struct inode *inode; 00070 }; 00071 00072 struct xp_queue 00073 { 00074 wait_queue_head_t queue; 00075 }; 00076 00077 struct xp_rwlock 00078 { 00079 rwlock_t rwlock; 00080 }; 00081 00082 #endif