Deleted Added
full compact
libbsm.h (155131) libbsm.h (155518)
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 *
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/bsm/libbsm.h#14 $
29 * $P4: //depot/projects/trustedbsd/openbsm/bsm/libbsm.h#16 $
30 */
31
32#ifndef _LIBBSM_H_
33#define _LIBBSM_H_
34
35/*
36 * NB: definitions, etc., marked with "OpenSSH compatibility" were introduced
37 * solely to allow OpenSSH to compile; Darwin/Apple code should not use them.
38 */
39
40#define MAX_ARGS 10
41#define MAX_ENV 10
42
43#include <sys/types.h>
44#include <sys/cdefs.h>
45#include <sys/queue.h>
46
30 */
31
32#ifndef _LIBBSM_H_
33#define _LIBBSM_H_
34
35/*
36 * NB: definitions, etc., marked with "OpenSSH compatibility" were introduced
37 * solely to allow OpenSSH to compile; Darwin/Apple code should not use them.
38 */
39
40#define MAX_ARGS 10
41#define MAX_ENV 10
42
43#include <sys/types.h>
44#include <sys/cdefs.h>
45#include <sys/queue.h>
46
47#include <stdint.h> /* Required for audit.h. */
48
47#include <bsm/audit.h>
48#include <bsm/audit_record.h>
49
50#include <stdio.h>
49#include <bsm/audit.h>
50#include <bsm/audit_record.h>
51
52#include <stdio.h>
51#include <stdint.h>
52
53#ifdef __APPLE__
54#include <mach/mach.h> /* audit_token_t */
55#endif
56
57#define AU_PRS_SUCCESS 1
58#define AU_PRS_FAILURE 2
59#define AU_PRS_BOTH (AU_PRS_SUCCESS|AU_PRS_FAILURE)

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

866 * the system.
867 *
868 * XXXRW: In Apple's bsm-8, these are marked __APPLE_API_PRIVATE.
869 */
870int au_get_state(void);
871__END_DECLS
872
873/* OpenSSH compatibility */
53
54#ifdef __APPLE__
55#include <mach/mach.h> /* audit_token_t */
56#endif
57
58#define AU_PRS_SUCCESS 1
59#define AU_PRS_FAILURE 2
60#define AU_PRS_BOTH (AU_PRS_SUCCESS|AU_PRS_FAILURE)

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

867 * the system.
868 *
869 * XXXRW: In Apple's bsm-8, these are marked __APPLE_API_PRIVATE.
870 */
871int au_get_state(void);
872__END_DECLS
873
874/* OpenSSH compatibility */
874#define cannot_audit(x) (!(au_get_state() == AUC_AUDITING))
875int cannot_audit(int);
875
876__BEGIN_DECLS
877/*
878 * audit_set_terminal_id()
879 *
880 * @summary - audit_set_terminal_id() fills in an au_tid_t struct, which is
881 * used in audit session initialization by processes like /usr/bin/login.
882 *

--- 293 unchanged lines hidden ---
876
877__BEGIN_DECLS
878/*
879 * audit_set_terminal_id()
880 *
881 * @summary - audit_set_terminal_id() fills in an au_tid_t struct, which is
882 * used in audit session initialization by processes like /usr/bin/login.
883 *

--- 293 unchanged lines hidden ---