- KASSERT(audit_lck_grp != NULL,
- ("audit_get_lck_grp: Could not allocate the audit lock group."));
+ error = host_get_audit_control_port(host_priv_self(), &audit_port);
+ if (error == KERN_SUCCESS && audit_port != MACH_PORT_NULL) {
+ (void)audit_triggers(audit_port, trigger);
+ ipc_port_release_send(audit_port);
+ return 0;
+ } else {
+ printf("Cannot get audit control port\n");
+ return error;
+ }