aboutsummaryrefslogtreecommitdiff
path: root/sys/bsm
diff options
context:
space:
mode:
authorChristian Brueffer <brueffer@FreeBSD.org>2016-12-06 14:25:52 +0000
committerChristian Brueffer <brueffer@FreeBSD.org>2016-12-06 14:25:52 +0000
commit47192295e7ee42c5e669dfdb5cb146bc87a63fe5 (patch)
treef9018775a034e965a29358c2c45d379973a6145a /sys/bsm
parent97aa9e7383bb228ff968ff77101bfa4b68358784 (diff)
downloadsrc-47192295e7ee42c5e669dfdb5cb146bc87a63fe5.tar.gz
src-47192295e7ee42c5e669dfdb5cb146bc87a63fe5.zip
Vendor import of OpenBSM 1.2-alpha5.vendor/openbsm/1.2-ALPHA-5
Notes
Notes: svn path=/vendor/openbsm/dist/; revision=309620 svn path=/vendor/openbsm/1.2-ALPHA-5/; revision=309621; tag=vendor/openbsm/1.2-ALPHA-5
Diffstat (limited to 'sys/bsm')
-rw-r--r--sys/bsm/Makefile.in183
-rw-r--r--sys/bsm/audit.h18
-rw-r--r--sys/bsm/audit_kevents.h33
-rw-r--r--sys/bsm/audit_record.h7
4 files changed, 178 insertions, 63 deletions
diff --git a/sys/bsm/Makefile.in b/sys/bsm/Makefile.in
index 465f5346036d..157f24e1e3ff 100644
--- a/sys/bsm/Makefile.in
+++ b/sys/bsm/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.12.2 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -15,23 +15,61 @@
@SET_MAKE@
VPATH = @srcdir@
-am__make_dryrun = \
- { \
- am__dry=no; \
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
- echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
- | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
- *) \
- for am__flg in $$MAKEFLAGS; do \
- case $$am__flg in \
- *=*|--*) ;; \
- *n*) am__dry=yes; break;; \
- esac; \
- done;; \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
esac; \
- test $$am__dry = yes; \
- }
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@@ -51,16 +89,31 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = sys/bsm
-DIST_COMMON = $(am__openbsm_HEADERS_DIST) $(srcdir)/Makefile.am \
- $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__openbsm_HEADERS_DIST) \
+ $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
SOURCES =
DIST_SOURCES =
am__can_run_installinfo = \
@@ -100,11 +153,30 @@ am__uninstall_files_from_dir = { \
}
am__installdirs = "$(DESTDIR)$(openbsmdir)"
HEADERS = $(openbsm_HEADERS)
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
@@ -144,6 +216,7 @@ LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
@@ -249,7 +322,6 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign sys/bsm/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign sys/bsm/Makefile
-.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
@@ -295,26 +367,15 @@ uninstall-openbsmHEADERS:
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
dir='$(DESTDIR)$(openbsmdir)'; $(am__uninstall_files_from_dir)
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- mkid -fID $$unique
-tags: TAGS
-
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
set x; \
here=`pwd`; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
+ $(am__define_uniq_tagged_files); \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
@@ -326,15 +387,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$$unique; \
fi; \
fi
-ctags: CTAGS
-CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
@@ -343,9 +400,10 @@ GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
-cscopelist: $(HEADERS) $(SOURCES) $(LISP)
- list='$(SOURCES) $(HEADERS) $(LISP)'; \
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
case "$(srcdir)" in \
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
*) sdir=$(subdir)/$(srcdir) ;; \
@@ -496,18 +554,21 @@ uninstall-am: uninstall-openbsmHEADERS
.MAKE: install-am install-strip
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
- clean-libtool cscopelist ctags distclean distclean-generic \
- distclean-libtool distclean-tags distdir dvi dvi-am html \
- html-am info info-am install install-am install-data \
- install-data-am install-dvi install-dvi-am install-exec \
- install-exec-am install-html install-html-am install-info \
- install-info-am install-man install-openbsmHEADERS install-pdf \
- install-pdf-am install-ps install-ps-am install-strip \
- installcheck installcheck-am installdirs maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-generic \
- mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
- uninstall-am uninstall-openbsmHEADERS
+.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
+ clean-libtool cscopelist-am ctags ctags-am distclean \
+ distclean-generic distclean-libtool distclean-tags distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-data install-data-am install-dvi install-dvi-am \
+ install-exec install-exec-am install-html install-html-am \
+ install-info install-info-am install-man \
+ install-openbsmHEADERS install-pdf install-pdf-am install-ps \
+ install-ps-am install-strip installcheck installcheck-am \
+ installdirs maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
+ ps ps-am tags tags-am uninstall uninstall-am \
+ uninstall-openbsmHEADERS
+
+.PRECIOUS: Makefile
# Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/sys/bsm/audit.h b/sys/bsm/audit.h
index 215981301a75..73077b33bd53 100644
--- a/sys/bsm/audit.h
+++ b/sys/bsm/audit.h
@@ -1,7 +1,13 @@
/*-
* Copyright (c) 2005-2009 Apple Inc.
+ * Copyright (c) 2016 Robert N. M. Watson
* All rights reserved.
*
+ * Portions of this software were developed by BAE Systems, the University of
+ * Cambridge Computer Laboratory, and Memorial University under DARPA/AFRL
+ * contract FA8650-15-C-7558 ("CADETS"), as part of the DARPA Transparent
+ * Computing (TC) research program.
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
@@ -123,6 +129,8 @@
#define A_SETQCTRL 36
#define A_GETCOND 37
#define A_SETCOND 38
+#define A_GETEVENT 39 /* Get audit event-to-name mapping. */
+#define A_SETEVENT 40 /* Set audit event-to-name mapping. */
/*
* Audit policy controls.
@@ -299,6 +307,16 @@ struct au_evclass_map {
typedef struct au_evclass_map au_evclass_map_t;
/*
+ * Event-to-name mapping.
+ */
+#define EVNAMEMAP_NAME_SIZE 64
+struct au_evname_map {
+ au_event_t en_number;
+ char en_name[EVNAMEMAP_NAME_SIZE];
+};
+typedef struct au_evname_map au_evname_map_t;
+
+/*
* Audit system calls.
*/
#if !defined(_KERNEL) && !defined(KERNEL)
diff --git a/sys/bsm/audit_kevents.h b/sys/bsm/audit_kevents.h
index 3f92b7195647..a4a3b865a9e2 100644
--- a/sys/bsm/audit_kevents.h
+++ b/sys/bsm/audit_kevents.h
@@ -609,6 +609,37 @@
#define AUE_BINDAT 43207 /* TrustedBSD. */
#define AUE_CONNECTAT 43208 /* TrustedBSD. */
#define AUE_CHFLAGSAT 43209 /* FreeBSD-specific. */
+#define AUE_PREADV 43210 /* FreeBSD-specific. */
+#define AUE_PWRITEV 43211 /* FreeBSD-specific. */
+#define AUE_POSIX_FALLOCATE 43212 /* FreeBSD-specific. */
+#define AUE_AIO_MLOCK 43213 /* FreeBSD-specific. */
+#define AUE_PROCCTL 43214 /* FreeBSD-specific. */
+#define AUE_AIO_READ 43215 /* FreeBSD-specific. */
+#define AUE_AIO_WRITE 43216 /* FreeBSD-specific. */
+#define AUE_AIO_RETURN 43217 /* FreeBSD-specific. */
+#define AUE_AIO_SUSPEND 43218 /* FreeBSD-specific. */
+#define AUE_AIO_CANCEL 43219 /* FreeBSD-specific. */
+#define AUE_AIO_ERROR 43220 /* FreeBSD-specific. */
+#define AUE_AIO_WAITCOMPLETE 43221 /* FreeBSD-specific. */
+#define AUE_AIO_FSYNC 43222 /* FreeBSD-specific. */
+#define AUE_THR_CREATE 43223 /* FreeBSD-specific. */
+#define AUE_THR_NEW 43224 /* FreeBSD-specific. */
+#define AUE_THR_EXIT 43225 /* FreeBSD-specific. */
+#define AUE_THR_KILL 43226 /* FreeBSD-specific. */
+#define AUE_THR_KILL2 43227 /* FreeBSD-specific. */
+#define AUE_SETFIB 43228 /* FreeBSD-specific. */
+#define AUE_LIO_LISTIO 43229 /* FreeBSD-specific. */
+#define AUE_SETUGID 43230 /* FreeBSD-specific. */
+#define AUE_SCTP_PEELOFF 43231 /* FreeBSD-specific. */
+#define AUE_SCTP_GENERIC_SENDMSG 43232 /* FreeBSD-specific. */
+#define AUE_SCTP_GENERIC_RECVMSG 43233 /* FreeBSD-specific. */
+#define AUE_JAIL_GET 43234 /* FreeBSD-specific. */
+#define AUE_JAIL_SET 43235 /* FreeBSD-specific. */
+#define AUE_JAIL_REMOVE 43236 /* FreeBSD-specific. */
+#define AUE_GETLOGINCLASS 43237 /* FreeBSD-specific. */
+#define AUE_SETLOGINCLASS 43238 /* FreeBSD-specific. */
+#define AUE_POSIX_FADVISE 43239 /* FreeBSD-specific. */
+#define AUE_SCTP_GENERIC_SENDMSG_IOV 43240 /* FreeBSD-specific. */
/*
* Darwin BSM uses a number of AUE_O_* definitions, which are aliased to the
@@ -746,7 +777,6 @@
#define AUE_MODWATCH AUE_NULL
#define AUE_MSGCL AUE_NULL
#define AUE_MSYNC AUE_NULL
-#define AUE_PREADV AUE_NULL
#define AUE_PROCINFO AUE_NULL
#define AUE_PTHREADCANCELED AUE_NULL
#define AUE_PTHREADCHDIR AUE_NULL
@@ -761,7 +791,6 @@
#define AUE_PTHREADMUTEXINIT AUE_NULL
#define AUE_PTHREADMUTEXTRYLOCK AUE_NULL
#define AUE_PTHREADMUTEXUNLOCK AUE_NULL
-#define AUE_PWRITEV AUE_NULL
#define AUE_REMOVEXATTR AUE_NULL
#define AUE_SBRK AUE_NULL
#define AUE_SELECT AUE_NULL
diff --git a/sys/bsm/audit_record.h b/sys/bsm/audit_record.h
index bd87fe8ab70d..447b9dc3d538 100644
--- a/sys/bsm/audit_record.h
+++ b/sys/bsm/audit_record.h
@@ -185,6 +185,13 @@ struct sockaddr_un;
struct vnode_au_info;
#endif
+#ifndef _CAP_RIGHTS_T_DECLARED
+#define _CAP_RIGHTS_T_DECLARED
+struct cap_rights;
+
+typedef struct cap_rights cap_rights_t;
+#endif
+
int au_open(void);
int au_write(int d, token_t *m);
int au_close(int d, int keep, short event);