2
#include "clamav-config.h"
6
/* DazukoXP Interface. Interace with Dazuko for file access control.
7
Written by John Ogness <jogness@antivir.de>
9
Copyright (c) 2002, 2003, 2004 H+BEDV Datentechnik GmbH
12
Redistribution and use in source and binary forms, with or without
13
modification, are permitted provided that the following conditions
16
1. Redistributions of source code must retain the above copyright notice,
17
this list of conditions and the following disclaimer.
19
2. Redistributions in binary form must reproduce the above copyright notice,
20
this list of conditions and the following disclaimer in the documentation
21
and/or other materials provided with the distribution.
23
3. Neither the name of Dazuko nor the names of its contributors may be used
24
to endorse or promote products derived from this software without specific
25
prior written permission.
27
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
28
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
29
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
30
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
31
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
32
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
33
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
34
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
35
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
36
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
37
POSSIBILITY OF SUCH DAMAGE.
43
/* various requests */
44
#define SET_ACCESS_MASK 0
45
#define ADD_INCLUDE_PATH 1
46
#define ADD_EXCLUDE_PATH 2
48
#define REMOVE_ALL_PATHS 4
50
#define GET_AN_ACCESS 6
51
#define RETURN_AN_ACCESS 7
53
/* this is just a large number to "guarentee"
54
to contain the full filename */
55
#define DAZUKO_FILENAME_MAX_LENGTH 6144
57
/* this is the hard-limit file length restriction from
59
#define DAZUKO_FILENAME_MAX_LENGTH_COMPAT12 4095
66
int reply_buffer_size;
68
int reply_buffer_size_used;
81
#define IOCTL_SET_OPTION 0
82
#define IOCTL_GET_AN_ACCESS 1
83
#define IOCTL_RETURN_ACCESS 2
85
/* compat12 structures */
87
struct access_compat12
89
int deny; /* set to deny file access */
90
int event; /* ON_OPEN, etc */
91
int o_flags; /* access flags */
92
int o_mode; /* access mode */
93
int uid; /* user id */
94
int pid; /* user process id */
95
char filename[DAZUKO_FILENAME_MAX_LENGTH_COMPAT12]; /* accessed file */
98
struct option_compat12
102
char buffer[DAZUKO_FILENAME_MAX_LENGTH_COMPAT12];