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 00025 #define DEVICE_NAME "dazuko" 00026 00027 #define XP_ERROR_PERMISSION -EPERM; 00028 #define XP_ERROR_INTERRUPT -EINTR; 00029 #define XP_ERROR_BUSY -EBUSY; 00030 #define XP_ERROR_FAULT -EFAULT; 00031 #define XP_ERROR_INVALID -EINVAL; 00032 #define XP_ERROR_NODEVICE -ENODEV; 00033 00034 00035 struct xp_daemon_id 00036 { 00037 int pid; 00038 struct file *file; 00039 }; 00040 00041 struct xp_file 00042 { 00043 char file; 00044 }; 00045 00046 struct xp_mutex 00047 { 00048 struct semaphore mutex; 00049 }; 00050 00051 struct xp_atomic 00052 { 00053 atomic_t atomic; 00054 }; 00055 00056 struct xp_file_struct 00057 { 00058 int full_filename_length; 00059 char *full_filename; 00060 int free_full_filename; 00061 struct dentry *dentry; 00062 int dput_dentry; 00063 char *buffer; 00064 int free_page_buffer; 00065 struct nameidata *nd; 00066 struct vfsmount *vfsmount; 00067 int mntput_vfsmount; 00068 struct inode *inode; 00069 }; 00070 00071 struct xp_queue 00072 { 00073 wait_queue_head_t queue; 00074 }; 00075 00076 struct xp_rwlock 00077 { 00078 rwlock_t rwlock; 00079 }; 00080 00081 #endif