~vcs-imports/clamav/main-old

« back to all changes in this revision

Viewing changes to clamd/dazukoio_xp.h

  • Committer: nervoso
  • Date: 2006-05-21 15:16:39 UTC
  • Revision ID: Arch-1:clamav@arch.ubuntu.com%clamav--MAIN--0--patch-1959
repository moved to cvs.clamav.net

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#if HAVE_CONFIG_H
2
 
#include "clamav-config.h"
3
 
#endif
4
 
 
5
 
#ifdef CLAMUKO
6
 
/* DazukoXP Interface. Interace with Dazuko for file access control.
7
 
   Written by John Ogness <jogness@antivir.de>
8
 
 
9
 
   Copyright (c) 2002, 2003, 2004 H+BEDV Datentechnik GmbH
10
 
   All rights reserved.
11
 
 
12
 
   Redistribution and use in source and binary forms, with or without
13
 
   modification, are permitted provided that the following conditions
14
 
   are met:
15
 
 
16
 
   1. Redistributions of source code must retain the above copyright notice,
17
 
   this list of conditions and the following disclaimer.
18
 
 
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.
22
 
 
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.
26
 
 
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.
38
 
*/
39
 
 
40
 
#ifndef DAZUKOIO_XP_H
41
 
#define DAZUKOIO_XP_H
42
 
 
43
 
/* various requests */
44
 
#define SET_ACCESS_MASK         0
45
 
#define ADD_INCLUDE_PATH        1
46
 
#define ADD_EXCLUDE_PATH        2
47
 
#define REGISTER                3
48
 
#define REMOVE_ALL_PATHS        4
49
 
#define UNREGISTER              5
50
 
#define GET_AN_ACCESS           6
51
 
#define RETURN_AN_ACCESS        7
52
 
 
53
 
/* this is just a large number to "guarentee"
54
 
   to contain the full filename */
55
 
#define DAZUKO_FILENAME_MAX_LENGTH      6144
56
 
 
57
 
/* this is the hard-limit file length restriction from
58
 
   the 1.x series */
59
 
#define DAZUKO_FILENAME_MAX_LENGTH_COMPAT12     4095
60
 
 
61
 
struct dazuko_request
62
 
{
63
 
        char    type[2];
64
 
        int     buffer_size;
65
 
        char    *buffer;
66
 
        int     reply_buffer_size;
67
 
        char    *reply_buffer;
68
 
        int     reply_buffer_size_used;
69
 
};
70
 
 
71
 
struct dazuko_id
72
 
{
73
 
        int     device;
74
 
        int     dev_major;
75
 
        int     id;
76
 
        int     write_mode;
77
 
};
78
 
 
79
 
/* compat12 ioctls */
80
 
 
81
 
#define IOCTL_SET_OPTION        0
82
 
#define IOCTL_GET_AN_ACCESS     1
83
 
#define IOCTL_RETURN_ACCESS     2
84
 
 
85
 
/* compat12 structures */
86
 
 
87
 
struct access_compat12
88
 
{
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 */
96
 
};
97
 
 
98
 
struct option_compat12
99
 
{
100
 
        int     command;
101
 
        int     buffer_length;
102
 
        char    buffer[DAZUKO_FILENAME_MAX_LENGTH_COMPAT12];
103
 
};
104
 
 
105
 
#endif
106
 
#endif