/*
- * Copyright (c) 2004 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2003-2004 Apple Computer, Inc. All rights reserved.
*
* @APPLE_LICENSE_HEADER_START@
*
#include <sys/types.h>
#include <sys/un.h>
#include <sys/event.h>
+#include <sys/ucred.h>
+#include <sys/ipc.h>
#include <bsm/audit.h>
#include <bsm/audit_record.h>
#include <bsm/audit_klib.h>
#include <bsm/audit_kernel.h>
#include <kern/clock.h>
+#include <kern/kalloc.h>
+
+#include <string.h>
#define GET_TOKEN_AREA(tok, dptr, length) \
do {\
{\
tok->len = length;\
dptr = tok->t_data = (u_char *)&tok[1];\
- memset(dptr, 0, length);\
- }\
+ memset(dptr, 0, length);\
+ }\
}while(0)
* node ID 8 bytes
* device 4 bytes/8 bytes (32-bit/64-bit)
*/
-token_t *au_to_attr32(struct vattr *attr)
+token_t *au_to_attr32(__unused struct vnode_attr *attr)
{
return NULL;
}
return t;
}
-token_t *au_to_attr64(struct vattr *attr)
+token_t *au_to_attr64(__unused struct vnode_attr *attr)
{
+ return NULL;
}
-
-token_t *kau_to_attr64(struct vnode_au_info *vni)
+
+token_t *kau_to_attr64(__unused struct vnode_au_info *vni)
{
return NULL;
}
-token_t *au_to_attr(struct vattr *attr)
+token_t *au_to_attr(struct vnode_attr *attr)
{
return au_to_attr32(attr);
* file name len 2 bytes
* file pathname N bytes + 1 terminating NULL byte
*/
-token_t *kau_to_file(char *file, struct timeval *tv)
+token_t *kau_to_file(const char *file, const struct timeval *tv)
{
token_t *t;
u_char *dptr;
return t;
}
-token_t *au_to_process64(au_id_t auid, uid_t euid, gid_t egid,
- uid_t ruid, gid_t rgid, pid_t pid,
- au_asid_t sid, au_tid_t *tid)
+token_t *au_to_process64(__unused au_id_t auid,
+ __unused uid_t euid,
+ __unused gid_t egid,
+ __unused uid_t ruid,
+ __unused gid_t rgid,
+ __unused pid_t pid,
+ __unused au_asid_t sid,
+ __unused au_tid_t *tid)
{
- return NULL;
-}
+ return NULL;
+ }
token_t *au_to_process(au_id_t auid, uid_t euid, gid_t egid,
uid_t ruid, gid_t rgid, pid_t pid,
return t;
}
-token_t *au_to_process64_ex(au_id_t auid, uid_t euid, gid_t egid,
- uid_t ruid, gid_t rgid, pid_t pid,
- au_asid_t sid, au_tid_addr_t *tid)
+token_t *au_to_process64_ex(
+ __unused au_id_t auid,
+ __unused uid_t euid,
+ __unused gid_t egid,
+ __unused uid_t ruid,
+ __unused gid_t rgid,
+ __unused pid_t pid,
+ __unused au_asid_t sid,
+ __unused au_tid_addr_t *tid)
{
return NULL;
}
-
+
token_t *au_to_process_ex(au_id_t auid, uid_t euid, gid_t egid,
uid_t ruid, gid_t rgid, pid_t pid,
au_asid_t sid, au_tid_addr_t *tid)
* remote port 2 bytes
* remote Internet address 4 bytes
*/
-token_t *au_to_socket(struct socket *so)
+token_t *au_to_socket(__unused struct socket *so)
{
return NULL;
}
* address type/length 4 bytes
* remote Internet address 4 bytes/16 bytes (IPv4/IPv6 address)
*/
-token_t *au_to_socket_ex_32(u_int16_t lp, u_int16_t rp,
- struct sockaddr *la, struct sockaddr *ra)
+token_t *au_to_socket_ex_32(
+ __unused u_int16_t lp,
+ __unused u_int16_t rp,
+ __unused struct sockaddr *la,
+ __unused struct sockaddr *ra)
{
return NULL;
}
-token_t *au_to_socket_ex_128(u_int16_t lp, u_int16_t rp,
- struct sockaddr *la, struct sockaddr *ra)
+token_t *au_to_socket_ex_128(
+ __unused u_int16_t lp,
+ __unused u_int16_t rp,
+ __unused struct sockaddr *la,
+ __unused struct sockaddr *ra)
{
return NULL;
}
return t;
}
-token_t *au_to_subject64(au_id_t auid, uid_t euid, gid_t egid,
- uid_t ruid, gid_t rgid, pid_t pid,
- au_asid_t sid, au_tid_t *tid)
+token_t *au_to_subject64(
+ __unused au_id_t auid,
+ __unused uid_t euid,
+ __unused gid_t egid,
+ __unused uid_t ruid,
+ __unused gid_t rgid,
+ __unused pid_t pid,
+ __unused au_asid_t sid,
+ __unused au_tid_t *tid)
{
- return NULL;
-}
-
+ return NULL;
+ }
+
token_t *au_to_subject(au_id_t auid, uid_t euid, gid_t egid,
uid_t ruid, gid_t rgid, pid_t pid,
au_asid_t sid, au_tid_t *tid)
return t;
}
-token_t *au_to_subject64_ex(au_id_t auid, uid_t euid,
- gid_t egid, uid_t ruid, gid_t rgid, pid_t pid,
- au_asid_t sid, au_tid_addr_t *tid)
+token_t *au_to_subject64_ex(
+ __unused au_id_t auid,
+ __unused uid_t euid,
+ __unused gid_t egid,
+ __unused uid_t ruid,
+ __unused gid_t rgid,
+ __unused pid_t pid,
+ __unused au_asid_t sid,
+ __unused au_tid_addr_t *tid)
{
return NULL;
}
* seconds of time 4 bytes/8 bytes (32-bit/64-bit value)
* milliseconds of time 4 bytes/8 bytes (32-bit/64-bit value)
*/
-token_t *kau_to_header32(struct timespec *ctime, int rec_size,
+token_t *kau_to_header32(const struct timespec *ctime, int rec_size,
au_event_t e_type, au_emod_t e_mod)
{
token_t *t;
return t;
}
-token_t *kau_to_header64(struct timespec *ctime, int rec_size,
- au_event_t e_type, au_emod_t e_mod)
+token_t *kau_to_header64(
+ __unused const struct timespec *ctime,
+ __unused int rec_size,
+ __unused au_event_t e_type,
+ __unused au_emod_t e_mod)
{
return NULL;
}
-
-token_t *kau_to_header(struct timespec *ctime, int rec_size,
+
+token_t *kau_to_header(const struct timespec *ctime, int rec_size,
au_event_t e_type, au_emod_t e_mod)
{
return kau_to_header32(ctime, rec_size, e_type, e_mod);