1/*- 2 * Copyright (c) 2004-2008 Apple 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 * --- 12 unchanged lines hidden (view full) --- 21 * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY 22 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 23 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 24 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 25 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * |
29 * $P4: //depot/projects/trustedbsd/openbsm/bin/auditd/auditd_darwin.c#3 $ |
30 */ 31 32#include <sys/types.h> 33 34#include <config/config.h> 35 36#include <errno.h> 37#include <stdarg.h> --- 40 unchanged lines hidden (view full) --- 78 */ 79static int max_idletime = 0; 80 81#ifndef __BSM_INTERNAL_NOTIFY_KEY 82#define __BSM_INTERNAL_NOTIFY_KEY "com.apple.audit.change" 83#endif /* __BSM_INTERNAL_NOTIFY_KEY */ 84 85#ifndef __AUDIT_LAUNCHD_LABEL |
86#define __AUDIT_LAUNCHD_LABEL "com.apple.auditd" |
87#endif /* __AUDIT_LAUNCHD_LABEL */ 88 89#define MAX_MSG_SIZE 4096 90 91/* 92 * Open and set up system logging. 93 */ 94void 95auditd_openlog(int debug, gid_t gid) 96{ 97 uint32_t opt = 0; 98 char *cp = NULL; 99 100 if (debug) 101 opt = ASL_OPT_STDERR; 102 |
103 au_aslclient = asl_open("auditd", "com.apple.auditd", opt); |
104 au_aslmsg = asl_new(ASL_TYPE_MSG); 105 106#ifdef ASL_KEY_READ_UID 107 /* 108 * Make it only so the audit administrator and members of the audit 109 * review group (if used) have access to the auditd system log messages. 110 */ 111 asl_set(au_aslmsg, ASL_KEY_READ_UID, "0"); --- 373 unchanged lines hidden --- |