Author: qboosh                       Date: Sun Aug 28 14:39:32 2005 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- change <linux/audit.h> to userspace version + little update (from 
2.6.13-something?) to get usable <libaudit.h>

---- Files affected:
SOURCES:
   linux-libc-headers-audit.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/linux-libc-headers-audit.patch
diff -u /dev/null SOURCES/linux-libc-headers-audit.patch:1.1
--- /dev/null   Sun Aug 28 16:39:32 2005
+++ SOURCES/linux-libc-headers-audit.patch      Sun Aug 28 16:39:26 2005
@@ -0,0 +1,123 @@
+--- linux-libc-headers-2.6.12.0/include/linux/audit.h.orig     2005-07-06 
02:17:21.000000000 +0200
++++ linux-libc-headers-2.6.12.0/include/linux/audit.h  2005-08-28 
16:35:11.219052000 +0200
+@@ -24,21 +24,53 @@
+ #ifndef _LINUX_AUDIT_H_
+ #define _LINUX_AUDIT_H_
+ 
+-#include <asm/types.h>
+-#include <linux/netlink.h>
++#include <elf.h>
+ 
+-#include <linux/sched.h>
+-#include <linux/elf.h>
++/* The netlink messages for the audit system is divided into blocks:
++ * 1000 - 1099 are for commanding the audit system
++ * 1100 - 1199 user space trusted application messages
++ * 1200 - 1299 messages internal to the audit daemon
++ * 1300 - 1399 audit event messages
++ * 1400 - 1499 SE Linux use
++ * 1500 - 1999 future use
++ * 2000 is for otherwise unclassified kernel audit messages
++ *
++ * Messages from 1000-1199 are bi-directional. 1200-1299 are exclusively user
++ * space. Anything over that is kernel --> user space communication.
++ */
++#define AUDIT_GET             1000    /* Get status */
++#define AUDIT_SET             1001    /* Set status (enable/disable/auditd) */
++#define AUDIT_LIST            1002    /* List syscall filtering rules */
++#define AUDIT_ADD             1003    /* Add syscall filtering rule */
++#define AUDIT_DEL             1004    /* Delete syscall filtering rule */
++#define AUDIT_USER            1005    /* Message from userspace -- deprecated 
*/
++#define AUDIT_LOGIN           1006    /* Define the login id and information 
*/
++#define AUDIT_WATCH_INS               1007    /* Insert file/dir watch entry 
*/
++#define AUDIT_WATCH_REM               1008    /* Remove file/dir watch entry 
*/
++#define AUDIT_WATCH_LIST      1009    /* List all file/dir watches */
++#define AUDIT_SIGNAL_INFO     1010    /* Get info about sender of signal to 
auditd */
++
++#define AUDIT_FIRST_USER_MSG  1100    /* Userspace messages uninteresting to 
kernel */
++#define AUDIT_LAST_USER_MSG   1199
++ 
++#define AUDIT_DAEMON_START      1200    /* Daemon startup record */
++#define AUDIT_DAEMON_END        1201    /* Daemon normal stop record */
++#define AUDIT_DAEMON_ABORT      1202    /* Daemon error stop record */
++#define AUDIT_DAEMON_CONFIG     1203    /* Daemon config change */
++
++#define AUDIT_SYSCALL         1300    /* Syscall event */
++#define AUDIT_FS_WATCH                1301    /* Filesystem watch event */
++#define AUDIT_PATH            1302    /* Filname path information */
++#define AUDIT_IPC             1303    /* IPC record */
++#define AUDIT_SOCKETCALL      1304    /* sys_socketcall arguments */
++#define AUDIT_CONFIG_CHANGE   1305    /* Audit system configuration change */
++#define AUDIT_SOCKADDR                1306    /* sockaddr copied as syscall 
arg */
++
++#define AUDIT_AVC             1400    /* SE Linux avc denial or grant */
++#define AUDIT_SELINUX_ERR     1401    /* Internal SE Linux Errors */
++#define AUDIT_AVC_PATH                1402    /* dentry, vfsmount pair from 
avc */
+ 
+-/* Request and reply types */
+-#define AUDIT_GET      1000   /* Get status */
+-#define AUDIT_SET      1001   /* Set status (enable/disable/auditd) */
+-#define AUDIT_LIST     1002   /* List filtering rules */
+-#define AUDIT_ADD      1003   /* Add filtering rule */
+-#define AUDIT_DEL      1004   /* Delete filtering rule */
+-#define AUDIT_USER     1005   /* Send a message from user-space */
+-#define AUDIT_LOGIN    1006     /* Define the login id and informaiton */
+-#define AUDIT_KERNEL   2000   /* Asynchronous audit record. NOT A REQUEST. */
++#define AUDIT_KERNEL          2000    /* Asynchronous audit record. NOT A 
REQUEST. */
+ 
+ /* Rule flags */
+ #define AUDIT_PER_TASK 0x01   /* Apply rule at task creation (not syscall) */
+@@ -55,7 +87,7 @@
+  * AUDIT_LIST commands must be implemented. */
+ #define AUDIT_MAX_FIELDS   64
+ #define AUDIT_BITMASK_SIZE 64
+-#define AUDIT_WORD(nr) ((__u32)((nr)/32))
++#define AUDIT_WORD(nr) ((uint32_t)((nr)/32))
+ #define AUDIT_BIT(nr)  (1 << ((nr) - AUDIT_WORD(nr)*32))
+ 
+ /* Rule fields */
+@@ -135,29 +167,24 @@
+ #define AUDIT_ARCH_V850               (EM_V850|__AUDIT_ARCH_LE)
+ #define AUDIT_ARCH_X86_64     (EM_X86_64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE)
+ 
+-struct audit_message {
+-      struct nlmsghdr nlh;
+-      char            data[1200];
+-};
+-
+ struct audit_status {
+-      __u32           mask;           /* Bit mask for valid entries */
+-      __u32           enabled;        /* 1 = enabled, 0 = disbaled */
+-      __u32           failure;        /* Failure-to-log action */
+-      __u32           pid;            /* pid of auditd process */
+-      __u32           rate_limit;     /* messages rate limit (per second) */
+-      __u32           backlog_limit;  /* waiting messages limit */
+-      __u32           lost;           /* messages lost */
+-      __u32           backlog;        /* messages waiting in queue */
++      uint32_t                mask;           /* Bit mask for valid entries */
++      uint32_t                enabled;        /* 1 = enabled, 0 = disabled */
++      uint32_t                failure;        /* Failure-to-log action */
++      uint32_t                pid;            /* pid of auditd process */
++      uint32_t                rate_limit;     /* messages rate limit (per 
second) */
++      uint32_t                backlog_limit;  /* waiting messages limit */
++      uint32_t                lost;           /* messages lost */
++      uint32_t                backlog;        /* messages waiting in queue */
+ };
+ 
+ struct audit_rule {           /* for AUDIT_LIST, AUDIT_ADD, and AUDIT_DEL */
+-      __u32           flags;  /* AUDIT_PER_{TASK,CALL}, AUDIT_PREPEND */
+-      __u32           action; /* AUDIT_NEVER, AUDIT_POSSIBLE, AUDIT_ALWAYS */
+-      __u32           field_count;
+-      __u32           mask[AUDIT_BITMASK_SIZE];
+-      __u32           fields[AUDIT_MAX_FIELDS];
+-      __u32           values[AUDIT_MAX_FIELDS];
++      uint32_t                flags;  /* AUDIT_PER_{TASK,CALL}, AUDIT_PREPEND 
*/
++      uint32_t                action; /* AUDIT_NEVER, AUDIT_POSSIBLE, 
AUDIT_ALWAYS */
++      uint32_t                field_count;
++      uint32_t                mask[AUDIT_BITMASK_SIZE];
++      uint32_t                fields[AUDIT_MAX_FIELDS];
++      uint32_t                values[AUDIT_MAX_FIELDS];
+ };
+ 
+-#endif
++#endif /* _LINUX_AUDIT_H_ */
================================================================
_______________________________________________
pld-cvs-commit mailing list
pld-cvs-commit@lists.pld-linux.org
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to