Deleted Added
sdiff udiff text old ( 155131 ) new ( 155518 )
full compact
1/*
2 * Copyright (c) 2004 Apple Computer, Inc.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 12 unchanged lines hidden (view full) ---

21 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
25 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
26 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27 * POSSIBILITY OF SUCH DAMAGE.
28 *
29 * $P4: //depot/projects/trustedbsd/openbsm/libbsm/bsm_notify.c#8 $
30 */
31
32#ifdef __APPLE__
33
34/*
35 * Based on sample code from Marc Majka.
36 */
37#include <notify.h>
38#include <string.h> /* strerror() */
39#include <sys/errno.h> /* errno */
40#include <bsm/libbsm.h>
41#include <stdint.h> /* uint32_t */
42#include <syslog.h> /* syslog() */
43#include <stdarg.h> /* syslog() */
44
45/* If 1, assumes a kernel that sends the right notification. */
46#define AUDIT_NOTIFICATION_ENABLED 1
47
48#if AUDIT_NOTIFICATION_ENABLED
49static int token = 0;
50#endif /* AUDIT_NOTIFICATION_ENABLED */
51
52static long au_cond = AUC_UNSET; /* <bsm/audit.h> */

--- 87 unchanged lines hidden (view full) ---

140 return (AUC_NOAUDIT);
141
142 case AUC_UNSET: /* Uninitialized; shouldn't get here. */
143 case AUC_AUDITING: /* Audit on. */
144 default:
145 return (AUC_AUDITING);
146 }
147}
148
149#endif /* !__APPLE__ */