]> git.pld-linux.org Git - packages/linux-libc-headers.git/blob - linux-libc-headers-audit.patch
- rel 5
[packages/linux-libc-headers.git] / linux-libc-headers-audit.patch
1 --- linux-libc-headers-2.6.12.0/include/linux/audit.h.orig      2005-07-06 02:17:21.000000000 +0200
2 +++ linux-libc-headers-2.6.12.0/include/linux/audit.h   2005-08-28 16:35:11.219052000 +0200
3 @@ -24,21 +24,53 @@
4  #ifndef _LINUX_AUDIT_H_
5  #define _LINUX_AUDIT_H_
6  
7 -#include <asm/types.h>
8 -#include <linux/netlink.h>
9 +#include <elf.h>
10  
11 -#include <linux/sched.h>
12 -#include <linux/elf.h>
13 +/* The netlink messages for the audit system is divided into blocks:
14 + * 1000 - 1099 are for commanding the audit system
15 + * 1100 - 1199 user space trusted application messages
16 + * 1200 - 1299 messages internal to the audit daemon
17 + * 1300 - 1399 audit event messages
18 + * 1400 - 1499 SE Linux use
19 + * 1500 - 1999 future use
20 + * 2000 is for otherwise unclassified kernel audit messages
21 + *
22 + * Messages from 1000-1199 are bi-directional. 1200-1299 are exclusively user
23 + * space. Anything over that is kernel --> user space communication.
24 + */
25 +#define AUDIT_GET              1000    /* Get status */
26 +#define AUDIT_SET              1001    /* Set status (enable/disable/auditd) */
27 +#define AUDIT_LIST             1002    /* List syscall filtering rules */
28 +#define AUDIT_ADD              1003    /* Add syscall filtering rule */
29 +#define AUDIT_DEL              1004    /* Delete syscall filtering rule */
30 +#define AUDIT_USER             1005    /* Message from userspace -- deprecated */
31 +#define AUDIT_LOGIN            1006    /* Define the login id and information */
32 +#define AUDIT_WATCH_INS                1007    /* Insert file/dir watch entry */
33 +#define AUDIT_WATCH_REM                1008    /* Remove file/dir watch entry */
34 +#define AUDIT_WATCH_LIST       1009    /* List all file/dir watches */
35 +#define AUDIT_SIGNAL_INFO      1010    /* Get info about sender of signal to auditd */
36 +
37 +#define AUDIT_FIRST_USER_MSG   1100    /* Userspace messages uninteresting to kernel */
38 +#define AUDIT_LAST_USER_MSG    1199
39
40 +#define AUDIT_DAEMON_START      1200    /* Daemon startup record */
41 +#define AUDIT_DAEMON_END        1201    /* Daemon normal stop record */
42 +#define AUDIT_DAEMON_ABORT      1202    /* Daemon error stop record */
43 +#define AUDIT_DAEMON_CONFIG     1203    /* Daemon config change */
44 +
45 +#define AUDIT_SYSCALL          1300    /* Syscall event */
46 +#define AUDIT_FS_WATCH         1301    /* Filesystem watch event */
47 +#define AUDIT_PATH             1302    /* Filname path information */
48 +#define AUDIT_IPC              1303    /* IPC record */
49 +#define AUDIT_SOCKETCALL       1304    /* sys_socketcall arguments */
50 +#define AUDIT_CONFIG_CHANGE    1305    /* Audit system configuration change */
51 +#define AUDIT_SOCKADDR         1306    /* sockaddr copied as syscall arg */
52 +
53 +#define AUDIT_AVC              1400    /* SE Linux avc denial or grant */
54 +#define AUDIT_SELINUX_ERR      1401    /* Internal SE Linux Errors */
55 +#define AUDIT_AVC_PATH         1402    /* dentry, vfsmount pair from avc */
56  
57 -/* Request and reply types */
58 -#define AUDIT_GET      1000    /* Get status */
59 -#define AUDIT_SET      1001    /* Set status (enable/disable/auditd) */
60 -#define AUDIT_LIST     1002    /* List filtering rules */
61 -#define AUDIT_ADD      1003    /* Add filtering rule */
62 -#define AUDIT_DEL      1004    /* Delete filtering rule */
63 -#define AUDIT_USER     1005    /* Send a message from user-space */
64 -#define AUDIT_LOGIN    1006     /* Define the login id and informaiton */
65 -#define AUDIT_KERNEL   2000    /* Asynchronous audit record. NOT A REQUEST. */
66 +#define AUDIT_KERNEL           2000    /* Asynchronous audit record. NOT A REQUEST. */
67  
68  /* Rule flags */
69  #define AUDIT_PER_TASK 0x01    /* Apply rule at task creation (not syscall) */
70 @@ -55,7 +87,7 @@
71   * AUDIT_LIST commands must be implemented. */
72  #define AUDIT_MAX_FIELDS   64
73  #define AUDIT_BITMASK_SIZE 64
74 -#define AUDIT_WORD(nr) ((__u32)((nr)/32))
75 +#define AUDIT_WORD(nr) ((uint32_t)((nr)/32))
76  #define AUDIT_BIT(nr)  (1 << ((nr) - AUDIT_WORD(nr)*32))
77  
78  /* Rule fields */
79 @@ -135,29 +167,24 @@
80  #define AUDIT_ARCH_V850                (EM_V850|__AUDIT_ARCH_LE)
81  #define AUDIT_ARCH_X86_64      (EM_X86_64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE)
82  
83 -struct audit_message {
84 -       struct nlmsghdr nlh;
85 -       char            data[1200];
86 -};
87 -
88  struct audit_status {
89 -       __u32           mask;           /* Bit mask for valid entries */
90 -       __u32           enabled;        /* 1 = enabled, 0 = disbaled */
91 -       __u32           failure;        /* Failure-to-log action */
92 -       __u32           pid;            /* pid of auditd process */
93 -       __u32           rate_limit;     /* messages rate limit (per second) */
94 -       __u32           backlog_limit;  /* waiting messages limit */
95 -       __u32           lost;           /* messages lost */
96 -       __u32           backlog;        /* messages waiting in queue */
97 +       uint32_t                mask;           /* Bit mask for valid entries */
98 +       uint32_t                enabled;        /* 1 = enabled, 0 = disabled */
99 +       uint32_t                failure;        /* Failure-to-log action */
100 +       uint32_t                pid;            /* pid of auditd process */
101 +       uint32_t                rate_limit;     /* messages rate limit (per second) */
102 +       uint32_t                backlog_limit;  /* waiting messages limit */
103 +       uint32_t                lost;           /* messages lost */
104 +       uint32_t                backlog;        /* messages waiting in queue */
105  };
106  
107  struct audit_rule {            /* for AUDIT_LIST, AUDIT_ADD, and AUDIT_DEL */
108 -       __u32           flags;  /* AUDIT_PER_{TASK,CALL}, AUDIT_PREPEND */
109 -       __u32           action; /* AUDIT_NEVER, AUDIT_POSSIBLE, AUDIT_ALWAYS */
110 -       __u32           field_count;
111 -       __u32           mask[AUDIT_BITMASK_SIZE];
112 -       __u32           fields[AUDIT_MAX_FIELDS];
113 -       __u32           values[AUDIT_MAX_FIELDS];
114 +       uint32_t                flags;  /* AUDIT_PER_{TASK,CALL}, AUDIT_PREPEND */
115 +       uint32_t                action; /* AUDIT_NEVER, AUDIT_POSSIBLE, AUDIT_ALWAYS */
116 +       uint32_t                field_count;
117 +       uint32_t                mask[AUDIT_BITMASK_SIZE];
118 +       uint32_t                fields[AUDIT_MAX_FIELDS];
119 +       uint32_t                values[AUDIT_MAX_FIELDS];
120  };
121  
122 -#endif
123 +#endif /* _LINUX_AUDIT_H_ */
This page took 0.033601 seconds and 3 git commands to generate.