/*
- * Copyright (c) 1999-2016 Apple Inc.
- * All rights reserved.
+ * Copyright (c) 1999-2020 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
kau_write(rec, tok);
break;
}
- /* FALLTHROUGH */
+ OS_FALLTHROUGH;
case A_SETPOLICY:
tok = au_to_arg32(3, "length", ar->ar_arg_len);
kau_write(rec, tok);
kau_write(rec, tok);
break;
}
- /* FALLTHROUGH */
+ OS_FALLTHROUGH;
case A_SETQCTRL:
tok = au_to_arg32(3, "length", ar->ar_arg_len);
kau_write(rec, tok);
kau_write(rec, tok);
break;
}
- /* FALLTHROUGH */
+ OS_FALLTHROUGH;
case A_SETCOND:
tok = au_to_arg32(3, "length", ar->ar_arg_len);
kau_write(rec, tok);
tok = au_to_arg32(2, "sd", ar->ar_arg_value32);
kau_write(rec, tok);
}
- /* FALLTHROUGH */
+ OS_FALLTHROUGH;
case AUE_ACCEPT:
case AUE_BIND:
case AUE_LISTEN:
tok = au_to_arg32(1, "setaudit_addr:port",
ar->ar_arg_termid_addr.at_port);
kau_write(rec, tok);
- if (ar->ar_arg_termid_addr.at_type == AU_IPv6) {
+ switch (ar->ar_arg_termid_addr.at_type) {
+ case AU_IPv6:
tok = au_to_in_addr_ex((struct in6_addr *)
&ar->ar_arg_termid_addr.at_addr[0]);
- }
- if (ar->ar_arg_termid_addr.at_type == AU_IPv4) {
+ kau_write(rec, tok);
+ break;
+ case AU_IPv4:
tok = au_to_in_addr((struct in_addr *)
&ar->ar_arg_termid_addr.at_addr[0]);
+ kau_write(rec, tok);
+ break;
}
- kau_write(rec, tok);
}
break;
tok = au_to_arg32(1, "cmd", ar->ar_arg_cmd);
kau_write(rec, tok);
}
- /* FALLTHROUGH */
+ OS_FALLTHROUGH;
case AUE_AUDITON_GETCAR:
case AUE_AUDITON_GETCLASS:
tok = au_to_arg32(0, "child PID", ar->ar_arg_pid);
kau_write(rec, tok);
}
- /* FALLTHROUGH */
+ OS_FALLTHROUGH;
case AUE_EXECVE:
if (ARG_IS_VALID(kar, ARG_ARGV)) {
case AUE_READ:
case AUE_READV:
case AUE_PREAD:
+ case AUE_PREADV:
case AUE_WRITE:
case AUE_WRITEV:
case AUE_PWRITE:
+ case AUE_PWRITEV:
FD_VNODE1_TOKENS;
break;
#if CONFIG_MACF
case AUE_MAC_MOUNT:
PROCESS_MAC_TOKENS;
- /* FALLTHROUGH */
+ OS_FALLTHROUGH;
#endif
case AUE_MOUNT:
/* XXX Need to handle NFS mounts */
tok = au_to_text(ar->ar_arg_text);
kau_write(rec, tok);
}
- /* FALLTHROUGH */
+ OS_FALLTHROUGH;
case AUE_UMOUNT:
case AUE_UNMOUNT:
case AUE_MSGCTL:
ar->ar_event = audit_msgctl_to_event(ar->ar_arg_svipc_cmd);
- /* FALLTHROUGH */
+ OS_FALLTHROUGH;
case AUE_MSGRCV:
case AUE_MSGSND:
case AUE_SEMCTL:
ar->ar_event = audit_semctl_to_event(ar->ar_arg_svipc_cmd);
- /* FALLTHROUGH */
+ OS_FALLTHROUGH;
case AUE_SEMOP:
if (ARG_IS_VALID(kar, ARG_SVIPC_ID)) {
tok = au_to_arg32(3, "mode", ar->ar_arg_mode);
kau_write(rec, tok);
}
- /* FALLTHROUGH */
+ OS_FALLTHROUGH;
case AUE_SHMUNLINK:
if (ARG_IS_VALID(kar, ARG_TEXT)) {
tok = au_to_arg32(4, "value", ar->ar_arg_value32);
kau_write(rec, tok);
}
- /* FALLTHROUGH */
+ OS_FALLTHROUGH;
case AUE_SEMUNLINK:
if (ARG_IS_VALID(kar, ARG_TEXT)) {
ar->ar_arg_opq_size);
kau_write(rec, tok);
}
- /* FALLTHROUGH */
+ OS_FALLTHROUGH;
case AUE_UMASK:
if (ARG_IS_VALID(kar, ARG_MASK)) {