This commit was manufactured by cvs2svn to create branch 'RELENG_6'.
This commit is contained in:
parent
7e277c8e1f
commit
d0023ab87e
17
contrib/openbsm/Makefile.am
Normal file
17
contrib/openbsm/Makefile.am
Normal file
@ -0,0 +1,17 @@
|
||||
#
|
||||
# $P4: //depot/projects/trustedbsd/openbsm/Makefile.am#2 $
|
||||
#
|
||||
|
||||
SUBDIRS = \
|
||||
bsm \
|
||||
libbsm \
|
||||
bin \
|
||||
man \
|
||||
modules
|
||||
|
||||
EXTRA_DIST = \
|
||||
CHANGELOG \
|
||||
LICENSE \
|
||||
README \
|
||||
TODO \
|
||||
VERSION
|
630
contrib/openbsm/Makefile.in
Normal file
630
contrib/openbsm/Makefile.in
Normal file
@ -0,0 +1,630 @@
|
||||
# Makefile.in generated by automake 1.9.6 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
#
|
||||
# $P4: //depot/projects/trustedbsd/openbsm/Makefile.in#4 $
|
||||
#
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = .
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in $(top_srcdir)/config/config.h.in \
|
||||
$(top_srcdir)/configure TODO config/config.guess \
|
||||
config/config.sub config/depcomp config/install-sh \
|
||||
config/ltmain.sh config/missing
|
||||
subdir = .
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
|
||||
configure.lineno configure.status.lineno
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/config/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
|
||||
html-recursive info-recursive install-data-recursive \
|
||||
install-exec-recursive install-info-recursive \
|
||||
install-recursive installcheck-recursive installdirs-recursive \
|
||||
pdf-recursive ps-recursive uninstall-info-recursive \
|
||||
uninstall-recursive
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DIST_SUBDIRS = $(SUBDIRS)
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
distdir = $(PACKAGE)-$(VERSION)
|
||||
top_distdir = $(distdir)
|
||||
am__remove_distdir = \
|
||||
{ test ! -d $(distdir) \
|
||||
|| { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
|
||||
&& rm -fr $(distdir); }; }
|
||||
DIST_ARCHIVES = $(distdir).tar.gz
|
||||
GZIP_ENV = --best
|
||||
distuninstallcheck_listfiles = find . -type f -print
|
||||
distcleancheck_listfiles = find . -type f -print
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
ECHO = @ECHO@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
FFLAGS = @FFLAGS@
|
||||
HAVE_AUDIT_SYSCALLS_FALSE = @HAVE_AUDIT_SYSCALLS_FALSE@
|
||||
HAVE_AUDIT_SYSCALLS_TRUE = @HAVE_AUDIT_SYSCALLS_TRUE@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAINT = @MAINT@
|
||||
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
|
||||
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
ac_ct_RANLIB = @ac_ct_RANLIB@
|
||||
ac_ct_STRIP = @ac_ct_STRIP@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
|
||||
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
datadir = @datadir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
SUBDIRS = \
|
||||
bsm \
|
||||
libbsm \
|
||||
bin \
|
||||
man \
|
||||
modules
|
||||
|
||||
EXTRA_DIST = \
|
||||
CHANGELOG \
|
||||
LICENSE \
|
||||
README \
|
||||
TODO \
|
||||
VERSION
|
||||
|
||||
all: all-recursive
|
||||
|
||||
.SUFFIXES:
|
||||
am--refresh:
|
||||
@:
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \
|
||||
cd $(srcdir) && $(AUTOMAKE) --foreign \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
echo ' $(SHELL) ./config.status'; \
|
||||
$(SHELL) ./config.status;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
$(SHELL) ./config.status --recheck
|
||||
|
||||
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(srcdir) && $(AUTOCONF)
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
|
||||
|
||||
config/config.h: config/stamp-h1
|
||||
@if test ! -f $@; then \
|
||||
rm -f config/stamp-h1; \
|
||||
$(MAKE) config/stamp-h1; \
|
||||
else :; fi
|
||||
|
||||
config/stamp-h1: $(top_srcdir)/config/config.h.in $(top_builddir)/config.status
|
||||
@rm -f config/stamp-h1
|
||||
cd $(top_builddir) && $(SHELL) ./config.status config/config.h
|
||||
$(top_srcdir)/config/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(top_srcdir) && $(AUTOHEADER)
|
||||
rm -f config/stamp-h1
|
||||
touch $@
|
||||
|
||||
distclean-hdr:
|
||||
-rm -f config/config.h config/stamp-h1
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool
|
||||
uninstall-info-am:
|
||||
|
||||
# This directory's subdirectories are mostly independent; you can cd
|
||||
# into them and run `make' without going through this Makefile.
|
||||
# To change the values of `make' variables: instead of editing Makefiles,
|
||||
# (1) if the variable is set in `config.status', edit `config.status'
|
||||
# (which will cause the Makefiles to be regenerated when you run `make');
|
||||
# (2) otherwise, pass the desired values on the `make' command line.
|
||||
$(RECURSIVE_TARGETS):
|
||||
@failcom='exit 1'; \
|
||||
for f in x $$MAKEFLAGS; do \
|
||||
case $$f in \
|
||||
*=* | --[!k]*);; \
|
||||
*k*) failcom='fail=yes';; \
|
||||
esac; \
|
||||
done; \
|
||||
dot_seen=no; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
dot_seen=yes; \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| eval $$failcom; \
|
||||
done; \
|
||||
if test "$$dot_seen" = "no"; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||
fi; test -z "$$fail"
|
||||
|
||||
mostlyclean-recursive clean-recursive distclean-recursive \
|
||||
maintainer-clean-recursive:
|
||||
@failcom='exit 1'; \
|
||||
for f in x $$MAKEFLAGS; do \
|
||||
case $$f in \
|
||||
*=* | --[!k]*);; \
|
||||
*k*) failcom='fail=yes';; \
|
||||
esac; \
|
||||
done; \
|
||||
dot_seen=no; \
|
||||
case "$@" in \
|
||||
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||
*) list='$(SUBDIRS)' ;; \
|
||||
esac; \
|
||||
rev=''; for subdir in $$list; do \
|
||||
if test "$$subdir" = "."; then :; else \
|
||||
rev="$$subdir $$rev"; \
|
||||
fi; \
|
||||
done; \
|
||||
rev="$$rev ."; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
for subdir in $$rev; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| eval $$failcom; \
|
||||
done && test -z "$$fail"
|
||||
tags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
|
||||
done
|
||||
ctags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
|
||||
done
|
||||
|
||||
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; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
|
||||
include_option=--etags-include; \
|
||||
empty_fix=.; \
|
||||
else \
|
||||
include_option=--include; \
|
||||
empty_fix=; \
|
||||
fi; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test ! -f $$subdir/TAGS || \
|
||||
tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
|
||||
fi; \
|
||||
done; \
|
||||
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; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
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; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
$(am__remove_distdir)
|
||||
mkdir $(distdir)
|
||||
$(mkdir_p) $(distdir)/config
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test -d "$(distdir)/$$subdir" \
|
||||
|| $(mkdir_p) "$(distdir)/$$subdir" \
|
||||
|| exit 1; \
|
||||
distdir=`$(am__cd) $(distdir) && pwd`; \
|
||||
top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
|
||||
(cd $$subdir && \
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="$$top_distdir" \
|
||||
distdir="$$distdir/$$subdir" \
|
||||
distdir) \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
|
||||
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
|
||||
|| chmod -R a+r $(distdir)
|
||||
dist-gzip: distdir
|
||||
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-bzip2: distdir
|
||||
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-tarZ: distdir
|
||||
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-shar: distdir
|
||||
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-zip: distdir
|
||||
-rm -f $(distdir).zip
|
||||
zip -rq $(distdir).zip $(distdir)
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist dist-all: distdir
|
||||
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
$(am__remove_distdir)
|
||||
|
||||
# This target untars the dist file and tries a VPATH configuration. Then
|
||||
# it guarantees that the distribution is self-contained by making another
|
||||
# tarfile.
|
||||
distcheck: dist
|
||||
case '$(DIST_ARCHIVES)' in \
|
||||
*.tar.gz*) \
|
||||
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
|
||||
*.tar.bz2*) \
|
||||
bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
|
||||
*.tar.Z*) \
|
||||
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
|
||||
*.shar.gz*) \
|
||||
GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
|
||||
*.zip*) \
|
||||
unzip $(distdir).zip ;;\
|
||||
esac
|
||||
chmod -R a-w $(distdir); chmod a+w $(distdir)
|
||||
mkdir $(distdir)/_build
|
||||
mkdir $(distdir)/_inst
|
||||
chmod a-w $(distdir)
|
||||
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
|
||||
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
|
||||
&& cd $(distdir)/_build \
|
||||
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
|
||||
$(DISTCHECK_CONFIGURE_FLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) check \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
|
||||
distuninstallcheck \
|
||||
&& chmod -R a-w "$$dc_install_base" \
|
||||
&& ({ \
|
||||
(cd ../.. && umask 077 && mkdir "$$dc_destdir") \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
|
||||
distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
|
||||
} || { rm -rf "$$dc_destdir"; exit 1; }) \
|
||||
&& rm -rf "$$dc_destdir" \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dist \
|
||||
&& rm -rf $(DIST_ARCHIVES) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck
|
||||
$(am__remove_distdir)
|
||||
@(echo "$(distdir) archives ready for distribution: "; \
|
||||
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
|
||||
sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'
|
||||
distuninstallcheck:
|
||||
@cd $(distuninstallcheck_dir) \
|
||||
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
|
||||
|| { echo "ERROR: files left after uninstall:" ; \
|
||||
if test -n "$(DESTDIR)"; then \
|
||||
echo " (check DESTDIR support)"; \
|
||||
fi ; \
|
||||
$(distuninstallcheck_listfiles) ; \
|
||||
exit 1; } >&2
|
||||
distcleancheck: distclean
|
||||
@if test '$(srcdir)' = . ; then \
|
||||
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
|
||||
exit 1 ; \
|
||||
fi
|
||||
@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|
||||
|| { echo "ERROR: files left in build directory after distclean:" ; \
|
||||
$(distcleancheck_listfiles) ; \
|
||||
exit 1; } >&2
|
||||
check-am: all-am
|
||||
check: check-recursive
|
||||
all-am: Makefile
|
||||
installdirs: installdirs-recursive
|
||||
installdirs-am:
|
||||
install: install-recursive
|
||||
install-exec: install-exec-recursive
|
||||
install-data: install-data-recursive
|
||||
uninstall: uninstall-recursive
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-recursive
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-recursive
|
||||
|
||||
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-recursive
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic distclean-hdr \
|
||||
distclean-libtool distclean-tags
|
||||
|
||||
dvi: dvi-recursive
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-recursive
|
||||
|
||||
info: info-recursive
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-info: install-info-recursive
|
||||
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-recursive
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -rf $(top_srcdir)/autom4te.cache
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-recursive
|
||||
|
||||
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||
|
||||
pdf: pdf-recursive
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-recursive
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-info-am
|
||||
|
||||
uninstall-info: uninstall-info-recursive
|
||||
|
||||
.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \
|
||||
check-am clean clean-generic clean-libtool clean-recursive \
|
||||
ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \
|
||||
dist-shar dist-tarZ dist-zip distcheck distclean \
|
||||
distclean-generic distclean-hdr distclean-libtool \
|
||||
distclean-recursive distclean-tags distcleancheck distdir \
|
||||
distuninstallcheck dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am install-exec \
|
||||
install-exec-am install-info install-info-am install-man \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
installdirs-am maintainer-clean maintainer-clean-generic \
|
||||
maintainer-clean-recursive mostlyclean mostlyclean-generic \
|
||||
mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \
|
||||
tags tags-recursive uninstall uninstall-am uninstall-info-am
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
21
contrib/openbsm/TODO
Normal file
21
contrib/openbsm/TODO
Normal file
@ -0,0 +1,21 @@
|
||||
- Teach praudit how to general XML format BSM streams.
|
||||
- Teach libbsm about any additional 64-bit token types that are present
|
||||
in more recent Solaris versions.
|
||||
- Build a regression test suite for libbsm that generates each token
|
||||
type and then compares the results with known good data. Make sure to
|
||||
test that things work properly with respect to endianness of the local
|
||||
platform.
|
||||
- Document contents of libbsm "public" data structures in libbsm man pages.
|
||||
- The audit.log.5 man page is incomplete, as it does not describe all
|
||||
token types.
|
||||
- With the move to autoconf/automake, man page symlinks are no longer
|
||||
installed. This needs to be fixed.
|
||||
- It might be desirable to be able to provide EOPNOTSUPP system call stubs
|
||||
on systems that don't have the necessary audit system calls; that would
|
||||
allow the full libbsm and tool set to build, just not run.
|
||||
- Teach praudit how to begin printing at any point in a token stream, not
|
||||
just at the beginning of a record. This will make it easier to use
|
||||
praudit in test suites processing single-token files without header and
|
||||
trailer context.
|
||||
|
||||
$P4: //depot/projects/trustedbsd/openbsm/TODO#6 $
|
14
contrib/openbsm/bin/Makefile.am
Normal file
14
contrib/openbsm/bin/Makefile.am
Normal file
@ -0,0 +1,14 @@
|
||||
#
|
||||
# $P4: //depot/projects/trustedbsd/openbsm/bin/Makefile.am#3 $
|
||||
#
|
||||
|
||||
SUBDIRS = \
|
||||
auditfilterd \
|
||||
auditreduce \
|
||||
praudit
|
||||
|
||||
if HAVE_AUDIT_SYSCALLS
|
||||
SUBDIRS += \
|
||||
audit \
|
||||
auditd
|
||||
endif
|
479
contrib/openbsm/bin/Makefile.in
Normal file
479
contrib/openbsm/bin/Makefile.in
Normal file
@ -0,0 +1,479 @@
|
||||
# Makefile.in generated by automake 1.9.6 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
#
|
||||
# $P4: //depot/projects/trustedbsd/openbsm/bin/Makefile.in#4 $
|
||||
#
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = ..
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
@HAVE_AUDIT_SYSCALLS_TRUE@am__append_1 = \
|
||||
@HAVE_AUDIT_SYSCALLS_TRUE@ audit \
|
||||
@HAVE_AUDIT_SYSCALLS_TRUE@ auditd
|
||||
|
||||
subdir = bin
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/config/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
|
||||
html-recursive info-recursive install-data-recursive \
|
||||
install-exec-recursive install-info-recursive \
|
||||
install-recursive installcheck-recursive installdirs-recursive \
|
||||
pdf-recursive ps-recursive uninstall-info-recursive \
|
||||
uninstall-recursive
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DIST_SUBDIRS = auditfilterd auditreduce praudit audit auditd
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
ECHO = @ECHO@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
FFLAGS = @FFLAGS@
|
||||
HAVE_AUDIT_SYSCALLS_FALSE = @HAVE_AUDIT_SYSCALLS_FALSE@
|
||||
HAVE_AUDIT_SYSCALLS_TRUE = @HAVE_AUDIT_SYSCALLS_TRUE@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAINT = @MAINT@
|
||||
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
|
||||
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
ac_ct_RANLIB = @ac_ct_RANLIB@
|
||||
ac_ct_STRIP = @ac_ct_STRIP@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
|
||||
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
datadir = @datadir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
SUBDIRS = auditfilterd auditreduce praudit $(am__append_1)
|
||||
all: all-recursive
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign bin/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign bin/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool
|
||||
uninstall-info-am:
|
||||
|
||||
# This directory's subdirectories are mostly independent; you can cd
|
||||
# into them and run `make' without going through this Makefile.
|
||||
# To change the values of `make' variables: instead of editing Makefiles,
|
||||
# (1) if the variable is set in `config.status', edit `config.status'
|
||||
# (which will cause the Makefiles to be regenerated when you run `make');
|
||||
# (2) otherwise, pass the desired values on the `make' command line.
|
||||
$(RECURSIVE_TARGETS):
|
||||
@failcom='exit 1'; \
|
||||
for f in x $$MAKEFLAGS; do \
|
||||
case $$f in \
|
||||
*=* | --[!k]*);; \
|
||||
*k*) failcom='fail=yes';; \
|
||||
esac; \
|
||||
done; \
|
||||
dot_seen=no; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
dot_seen=yes; \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| eval $$failcom; \
|
||||
done; \
|
||||
if test "$$dot_seen" = "no"; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||
fi; test -z "$$fail"
|
||||
|
||||
mostlyclean-recursive clean-recursive distclean-recursive \
|
||||
maintainer-clean-recursive:
|
||||
@failcom='exit 1'; \
|
||||
for f in x $$MAKEFLAGS; do \
|
||||
case $$f in \
|
||||
*=* | --[!k]*);; \
|
||||
*k*) failcom='fail=yes';; \
|
||||
esac; \
|
||||
done; \
|
||||
dot_seen=no; \
|
||||
case "$@" in \
|
||||
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||
*) list='$(SUBDIRS)' ;; \
|
||||
esac; \
|
||||
rev=''; for subdir in $$list; do \
|
||||
if test "$$subdir" = "."; then :; else \
|
||||
rev="$$subdir $$rev"; \
|
||||
fi; \
|
||||
done; \
|
||||
rev="$$rev ."; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
for subdir in $$rev; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| eval $$failcom; \
|
||||
done && test -z "$$fail"
|
||||
tags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
|
||||
done
|
||||
ctags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
|
||||
done
|
||||
|
||||
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; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
|
||||
include_option=--etags-include; \
|
||||
empty_fix=.; \
|
||||
else \
|
||||
include_option=--include; \
|
||||
empty_fix=; \
|
||||
fi; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test ! -f $$subdir/TAGS || \
|
||||
tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
|
||||
fi; \
|
||||
done; \
|
||||
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; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
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; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test -d "$(distdir)/$$subdir" \
|
||||
|| $(mkdir_p) "$(distdir)/$$subdir" \
|
||||
|| exit 1; \
|
||||
distdir=`$(am__cd) $(distdir) && pwd`; \
|
||||
top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
|
||||
(cd $$subdir && \
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="$$top_distdir" \
|
||||
distdir="$$distdir/$$subdir" \
|
||||
distdir) \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-recursive
|
||||
all-am: Makefile
|
||||
installdirs: installdirs-recursive
|
||||
installdirs-am:
|
||||
install: install-recursive
|
||||
install-exec: install-exec-recursive
|
||||
install-data: install-data-recursive
|
||||
uninstall: uninstall-recursive
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-recursive
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-recursive
|
||||
|
||||
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-recursive
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic distclean-libtool \
|
||||
distclean-tags
|
||||
|
||||
dvi: dvi-recursive
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-recursive
|
||||
|
||||
info: info-recursive
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-info: install-info-recursive
|
||||
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-recursive
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-recursive
|
||||
|
||||
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||
|
||||
pdf: pdf-recursive
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-recursive
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-info-am
|
||||
|
||||
uninstall-info: uninstall-info-recursive
|
||||
|
||||
.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
|
||||
clean clean-generic clean-libtool clean-recursive ctags \
|
||||
ctags-recursive distclean distclean-generic distclean-libtool \
|
||||
distclean-recursive distclean-tags distdir dvi dvi-am html \
|
||||
html-am info info-am install install-am install-data \
|
||||
install-data-am install-exec install-exec-am install-info \
|
||||
install-info-am install-man install-strip installcheck \
|
||||
installcheck-am installdirs installdirs-am maintainer-clean \
|
||||
maintainer-clean-generic maintainer-clean-recursive \
|
||||
mostlyclean mostlyclean-generic mostlyclean-libtool \
|
||||
mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
|
||||
uninstall uninstall-am uninstall-info-am
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
10
contrib/openbsm/bin/auditfilterd/Makefile.am
Normal file
10
contrib/openbsm/bin/auditfilterd/Makefile.am
Normal file
@ -0,0 +1,10 @@
|
||||
#
|
||||
# $P4: //depot/projects/trustedbsd/openbsm/bin/auditfilterd/Makefile.am#1 $
|
||||
#
|
||||
|
||||
INCLUDES = -I$(top_srcdir)
|
||||
|
||||
sbin_PROGRAMS = auditfilterd
|
||||
auditfilterd_SOURCES = auditfilterd_conf.c auditfilterd.c
|
||||
auditfilterd_LDADD = $(top_builddir)/libbsm/libbsm.la
|
||||
man8_MANS = auditfilterd.8
|
508
contrib/openbsm/bin/auditfilterd/Makefile.in
Normal file
508
contrib/openbsm/bin/auditfilterd/Makefile.in
Normal file
@ -0,0 +1,508 @@
|
||||
# Makefile.in generated by automake 1.9.6 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
#
|
||||
# $P4: //depot/projects/trustedbsd/openbsm/bin/auditfilterd/Makefile.in#1 $
|
||||
#
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = ../..
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
sbin_PROGRAMS = auditfilterd$(EXEEXT)
|
||||
subdir = bin/auditfilterd
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/config/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
am__installdirs = "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man8dir)"
|
||||
sbinPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
|
||||
PROGRAMS = $(sbin_PROGRAMS)
|
||||
am_auditfilterd_OBJECTS = auditfilterd_conf.$(OBJEXT) \
|
||||
auditfilterd.$(OBJEXT)
|
||||
auditfilterd_OBJECTS = $(am_auditfilterd_OBJECTS)
|
||||
auditfilterd_DEPENDENCIES = $(top_builddir)/libbsm/libbsm.la
|
||||
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/config
|
||||
depcomp = $(SHELL) $(top_srcdir)/config/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
|
||||
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
||||
$(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
SOURCES = $(auditfilterd_SOURCES)
|
||||
DIST_SOURCES = $(auditfilterd_SOURCES)
|
||||
man8dir = $(mandir)/man8
|
||||
NROFF = nroff
|
||||
MANS = $(man8_MANS)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
ECHO = @ECHO@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
FFLAGS = @FFLAGS@
|
||||
HAVE_AUDIT_SYSCALLS_FALSE = @HAVE_AUDIT_SYSCALLS_FALSE@
|
||||
HAVE_AUDIT_SYSCALLS_TRUE = @HAVE_AUDIT_SYSCALLS_TRUE@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAINT = @MAINT@
|
||||
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
|
||||
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
ac_ct_RANLIB = @ac_ct_RANLIB@
|
||||
ac_ct_STRIP = @ac_ct_STRIP@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
|
||||
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
datadir = @datadir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
INCLUDES = -I$(top_srcdir)
|
||||
auditfilterd_SOURCES = auditfilterd_conf.c auditfilterd.c
|
||||
auditfilterd_LDADD = $(top_builddir)/libbsm/libbsm.la
|
||||
man8_MANS = auditfilterd.8
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .lo .o .obj
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign bin/auditfilterd/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign bin/auditfilterd/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
install-sbinPROGRAMS: $(sbin_PROGRAMS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(sbindir)" || $(mkdir_p) "$(DESTDIR)$(sbindir)"
|
||||
@list='$(sbin_PROGRAMS)'; for p in $$list; do \
|
||||
p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
|
||||
if test -f $$p \
|
||||
|| test -f $$p1 \
|
||||
; then \
|
||||
f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
|
||||
echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(sbinPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(sbindir)/$$f'"; \
|
||||
$(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(sbinPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(sbindir)/$$f" || exit 1; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
uninstall-sbinPROGRAMS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(sbin_PROGRAMS)'; for p in $$list; do \
|
||||
f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
|
||||
echo " rm -f '$(DESTDIR)$(sbindir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(sbindir)/$$f"; \
|
||||
done
|
||||
|
||||
clean-sbinPROGRAMS:
|
||||
@list='$(sbin_PROGRAMS)'; for p in $$list; do \
|
||||
f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
|
||||
echo " rm -f $$p $$f"; \
|
||||
rm -f $$p $$f ; \
|
||||
done
|
||||
auditfilterd$(EXEEXT): $(auditfilterd_OBJECTS) $(auditfilterd_DEPENDENCIES)
|
||||
@rm -f auditfilterd$(EXEEXT)
|
||||
$(LINK) $(auditfilterd_LDFLAGS) $(auditfilterd_OBJECTS) $(auditfilterd_LDADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/auditfilterd.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/auditfilterd_conf.Po@am__quote@
|
||||
|
||||
.c.o:
|
||||
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
|
||||
|
||||
.c.obj:
|
||||
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
|
||||
|
||||
.c.lo:
|
||||
@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool
|
||||
uninstall-info-am:
|
||||
install-man8: $(man8_MANS) $(man_MANS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(man8dir)" || $(mkdir_p) "$(DESTDIR)$(man8dir)"
|
||||
@list='$(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS)'; \
|
||||
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
|
||||
for i in $$l2; do \
|
||||
case "$$i" in \
|
||||
*.8*) list="$$list $$i" ;; \
|
||||
esac; \
|
||||
done; \
|
||||
for i in $$list; do \
|
||||
if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
|
||||
else file=$$i; fi; \
|
||||
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
|
||||
case "$$ext" in \
|
||||
8*) ;; \
|
||||
*) ext='8' ;; \
|
||||
esac; \
|
||||
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
|
||||
inst=`echo $$inst | sed -e 's/^.*\///'`; \
|
||||
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
|
||||
echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \
|
||||
$(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst"; \
|
||||
done
|
||||
uninstall-man8:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS)'; \
|
||||
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
|
||||
for i in $$l2; do \
|
||||
case "$$i" in \
|
||||
*.8*) list="$$list $$i" ;; \
|
||||
esac; \
|
||||
done; \
|
||||
for i in $$list; do \
|
||||
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
|
||||
case "$$ext" in \
|
||||
8*) ;; \
|
||||
*) ext='8' ;; \
|
||||
esac; \
|
||||
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
|
||||
inst=`echo $$inst | sed -e 's/^.*\///'`; \
|
||||
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
|
||||
echo " rm -f '$(DESTDIR)$(man8dir)/$$inst'"; \
|
||||
rm -f "$(DESTDIR)$(man8dir)/$$inst"; \
|
||||
done
|
||||
|
||||
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; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
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; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
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; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(PROGRAMS) $(MANS)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man8dir)"; do \
|
||||
test -z "$$dir" || $(mkdir_p) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libtool clean-sbinPROGRAMS \
|
||||
mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-libtool distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am: install-man
|
||||
|
||||
install-exec-am: install-sbinPROGRAMS
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-man: install-man8
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
|
||||
mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-info-am uninstall-man uninstall-sbinPROGRAMS
|
||||
|
||||
uninstall-man: uninstall-man8
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
|
||||
clean-libtool clean-sbinPROGRAMS ctags distclean \
|
||||
distclean-compile 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-exec \
|
||||
install-exec-am install-info install-info-am install-man \
|
||||
install-man8 install-sbinPROGRAMS install-strip installcheck \
|
||||
installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-compile \
|
||||
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
|
||||
tags uninstall uninstall-am uninstall-info-am uninstall-man \
|
||||
uninstall-man8 uninstall-sbinPROGRAMS
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
77
contrib/openbsm/bin/auditfilterd/auditfilterd.8
Normal file
77
contrib/openbsm/bin/auditfilterd/auditfilterd.8
Normal file
@ -0,0 +1,77 @@
|
||||
.\"-
|
||||
.\" Copyright (c) 2006 Robert N. M. Watson
|
||||
.\" All rights reserved.
|
||||
.\"
|
||||
.\" Redistribution and use in source and binary forms, with or without
|
||||
.\" modification, are permitted provided that the following conditions
|
||||
.\" are met:
|
||||
.\" 1. Redistributions of source code must retain the above copyright
|
||||
.\" notice, this list of conditions and the following disclaimer.
|
||||
.\" 2. Redistributions in binary form must reproduce the above copyright
|
||||
.\" notice, this list of conditions and the following disclaimer in the
|
||||
.\" documentation and/or other materials provided with the distribution.
|
||||
.\"
|
||||
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.\" $P4: //depot/projects/trustedbsd/openbsm/bin/auditfilterd/auditfilterd.8#2 $
|
||||
.\"
|
||||
.Dd March 27, 2006
|
||||
.Dt AUDITFILTERD 8
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm auditfilterd
|
||||
.Nd audit filter daemon
|
||||
.Sh SYNOPSIS
|
||||
.Nm auditfilterd
|
||||
.Op Fl d
|
||||
.Op Fl c Ar conffile
|
||||
.Op Fl t Ar trailfile
|
||||
.Sh DESCRIPTION
|
||||
The
|
||||
.Nm
|
||||
daemon is an extensible audit event monitoring daemon, allowing pluggable
|
||||
modules to track audit events from a live audit source.
|
||||
It is configured using the
|
||||
.Xr audit_filter 5
|
||||
configuration file.
|
||||
.Pp
|
||||
The options are as follows:
|
||||
.Bl -tag -width Ds
|
||||
.It Fl d
|
||||
Starts the daemon in debug mode - it will not daemonize.
|
||||
.It Fl c Ar conffile
|
||||
Specify an alternative configuration file.
|
||||
.It Fl t Ar trailfile
|
||||
Specify an alternative source of audit event records.
|
||||
.El
|
||||
.Sh FILES
|
||||
.Bl -tag -width "/etc/security/audit_filterd" -compact
|
||||
.It Pa /etc/security/audit_filterd
|
||||
Default configuration file for
|
||||
.Nm .
|
||||
.It Pa /dev/auditpipe
|
||||
Default audit record source for
|
||||
.Nm .
|
||||
.El
|
||||
.Sh SEE ALSO
|
||||
.Xr audit 8 ,
|
||||
.Xr auditd 8
|
||||
.Sh AUTHORS
|
||||
The
|
||||
.Nm
|
||||
daemon and audit filter APIs were created by Robert Watson.
|
||||
.Sh HISTORY
|
||||
The OpenBSM implementation was created by McAfee Research, the security
|
||||
division of McAfee Inc., under contract to Apple Computer Inc. in 2004.
|
||||
It was subsequently adopted by the TrustedBSD Project as the foundation for
|
||||
the OpenBSM distribution.
|
700
contrib/openbsm/bin/auditreduce/auditreduce.c
Normal file
700
contrib/openbsm/bin/auditreduce/auditreduce.c
Normal file
@ -0,0 +1,700 @@
|
||||
/*
|
||||
* Copyright (c) 2004 Apple Computer, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
|
||||
* its contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $P4: //depot/projects/trustedbsd/openbsm/bin/auditreduce/auditreduce.c#14 $
|
||||
*/
|
||||
|
||||
/*
|
||||
* Tool used to merge and select audit records from audit trail files
|
||||
*/
|
||||
|
||||
/*
|
||||
* XXX Currently we do not support merging of records from multiple
|
||||
* XXX audit trail files
|
||||
* XXX We assume that records are sorted chronologically - both wrt to
|
||||
* XXX the records present within the file and between the files themselves
|
||||
*/
|
||||
|
||||
#include <bsm/libbsm.h>
|
||||
|
||||
#include <err.h>
|
||||
#include <grp.h>
|
||||
#include <pwd.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <sysexits.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "auditreduce.h"
|
||||
|
||||
extern char *optarg;
|
||||
extern int optind, optopt, opterr,optreset;
|
||||
|
||||
static au_mask_t maskp; /* Class. */
|
||||
static time_t p_atime; /* Created after this time. */
|
||||
static time_t p_btime; /* Created before this time. */
|
||||
static uint16_t p_evtype; /* Event that we are searching for. */
|
||||
static int p_auid; /* Audit id. */
|
||||
static int p_euid; /* Effective user id. */
|
||||
static int p_egid; /* Effective group id. */
|
||||
static int p_rgid; /* Real group id. */
|
||||
static int p_ruid; /* Real user id. */
|
||||
static int p_subid; /* Subject id. */
|
||||
|
||||
/*
|
||||
* Following are the objects (-o option) that we can select upon.
|
||||
*/
|
||||
static char *p_fileobj = NULL;
|
||||
static char *p_msgqobj = NULL;
|
||||
static char *p_pidobj = NULL;
|
||||
static char *p_semobj = NULL;
|
||||
static char *p_shmobj = NULL;
|
||||
static char *p_sockobj = NULL;
|
||||
|
||||
static uint32_t opttochk = 0;
|
||||
|
||||
static void
|
||||
usage(const char *msg)
|
||||
{
|
||||
fprintf(stderr, "%s\n", msg);
|
||||
fprintf(stderr, "Usage: auditreduce [options] audit-trail-file [....] \n");
|
||||
fprintf(stderr, "\tOptions are : \n");
|
||||
fprintf(stderr, "\t-A : all records\n");
|
||||
fprintf(stderr, "\t-a YYYYMMDD[HH[[MM[SS]]] : after date\n");
|
||||
fprintf(stderr, "\t-b YYYYMMDD[HH[[MM[SS]]] : before date\n");
|
||||
fprintf(stderr, "\t-c <flags> : matching class\n");
|
||||
fprintf(stderr, "\t-d YYYYMMDD : on date\n");
|
||||
fprintf(stderr, "\t-e <uid|name> : effective user\n");
|
||||
fprintf(stderr, "\t-f <gid|group> : effective group\n");
|
||||
fprintf(stderr, "\t-g <gid|group> : real group\n");
|
||||
fprintf(stderr, "\t-j <pid> : subject id \n");
|
||||
fprintf(stderr, "\t-m <evno|evname> : matching event\n");
|
||||
fprintf(stderr, "\t-o objecttype=objectvalue\n");
|
||||
fprintf(stderr, "\t\t file=<pathname>\n");
|
||||
fprintf(stderr, "\t\t msgqid=<ID>\n");
|
||||
fprintf(stderr, "\t\t pid=<ID>\n");
|
||||
fprintf(stderr, "\t\t semid=<ID>\n");
|
||||
fprintf(stderr, "\t\t shmid=<ID>\n");
|
||||
fprintf(stderr, "\t-r <uid|name> : real user\n");
|
||||
fprintf(stderr, "\t-u <uid|name> : audit user\n");
|
||||
exit(EX_USAGE);
|
||||
}
|
||||
|
||||
/*
|
||||
* Check if the given auid matches the selection criteria.
|
||||
*/
|
||||
static int
|
||||
select_auid(int au)
|
||||
{
|
||||
|
||||
/* Check if we want to select on auid. */
|
||||
if (ISOPTSET(opttochk, OPT_u)) {
|
||||
if (au != p_auid)
|
||||
return (0);
|
||||
}
|
||||
return (1);
|
||||
}
|
||||
|
||||
/*
|
||||
* Check if the given euid matches the selection criteria.
|
||||
*/
|
||||
static int
|
||||
select_euid(int euser)
|
||||
{
|
||||
|
||||
/* Check if we want to select on euid. */
|
||||
if (ISOPTSET(opttochk, OPT_e)) {
|
||||
if (euser != p_euid)
|
||||
return (0);
|
||||
}
|
||||
return (1);
|
||||
}
|
||||
|
||||
/*
|
||||
* Check if the given egid matches the selection criteria.
|
||||
*/
|
||||
static int
|
||||
select_egid(int egrp)
|
||||
{
|
||||
|
||||
/* Check if we want to select on egid. */
|
||||
if (ISOPTSET(opttochk, OPT_f)) {
|
||||
if (egrp != p_egid)
|
||||
return (0);
|
||||
}
|
||||
return (1);
|
||||
}
|
||||
|
||||
/*
|
||||
* Check if the given rgid matches the selection criteria.
|
||||
*/
|
||||
static int
|
||||
select_rgid(int grp)
|
||||
{
|
||||
|
||||
/* Check if we want to select on rgid. */
|
||||
if (ISOPTSET(opttochk, OPT_g)) {
|
||||
if (grp != p_rgid)
|
||||
return (0);
|
||||
}
|
||||
return (1);
|
||||
}
|
||||
|
||||
/*
|
||||
* Check if the given ruid matches the selection criteria.
|
||||
*/
|
||||
static int
|
||||
select_ruid(int user)
|
||||
{
|
||||
|
||||
/* Check if we want to select on rgid. */
|
||||
if (ISOPTSET(opttochk, OPT_r)) {
|
||||
if (user != p_ruid)
|
||||
return (0);
|
||||
}
|
||||
return (1);
|
||||
}
|
||||
|
||||
/*
|
||||
* Check if the given subject id (pid) matches the selection criteria.
|
||||
*/
|
||||
static int
|
||||
select_subid(int subid)
|
||||
{
|
||||
|
||||
/* Check if we want to select on subject uid. */
|
||||
if (ISOPTSET(opttochk, OPT_j)) {
|
||||
if (subid != p_subid)
|
||||
return (0);
|
||||
}
|
||||
return (1);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Check if object's pid maches the given pid.
|
||||
*/
|
||||
static int
|
||||
select_pidobj(uint32_t pid)
|
||||
{
|
||||
|
||||
if (ISOPTSET(opttochk, OPT_op)) {
|
||||
if (pid != strtol(p_pidobj, (char **)NULL, 10))
|
||||
return (0);
|
||||
}
|
||||
return (1);
|
||||
}
|
||||
|
||||
/*
|
||||
* Check if the given ipc object with the given type matches the selection
|
||||
* criteria.
|
||||
*/
|
||||
static int
|
||||
select_ipcobj(u_char type, uint32_t id, uint32_t *optchkd)
|
||||
{
|
||||
|
||||
if (type == AT_IPC_MSG) {
|
||||
SETOPT((*optchkd), OPT_om);
|
||||
if (ISOPTSET(opttochk, OPT_om)) {
|
||||
if (id != strtol(p_msgqobj, (char **)NULL, 10))
|
||||
return (0);
|
||||
}
|
||||
return (1);
|
||||
} else if (type == AT_IPC_SEM) {
|
||||
SETOPT((*optchkd), OPT_ose);
|
||||
if (ISOPTSET(opttochk, OPT_ose)) {
|
||||
if (id != strtol(p_semobj, (char **)NULL, 10))
|
||||
return (0);
|
||||
}
|
||||
return (1);
|
||||
} else if (type == AT_IPC_SHM) {
|
||||
SETOPT((*optchkd), OPT_osh);
|
||||
if (ISOPTSET(opttochk, OPT_osh)) {
|
||||
if (id != strtol(p_shmobj, (char **)NULL, 10))
|
||||
return (0);
|
||||
}
|
||||
return (1);
|
||||
}
|
||||
|
||||
/* Unknown type -- filter if *any* ipc filtering is required. */
|
||||
if (ISOPTSET(opttochk, OPT_om) || ISOPTSET(opttochk, OPT_ose)
|
||||
|| ISOPTSET(opttochk, OPT_osh))
|
||||
return (0);
|
||||
|
||||
return (1);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Check if the file name matches selection criteria.
|
||||
*/
|
||||
static int
|
||||
select_filepath(char *path, uint32_t *optchkd)
|
||||
{
|
||||
char *loc;
|
||||
|
||||
SETOPT((*optchkd), OPT_of);
|
||||
if (ISOPTSET(opttochk, OPT_of)) {
|
||||
if (p_fileobj[0] == '~') {
|
||||
/* Object should not be in path. */
|
||||
loc = strstr(path, p_fileobj + 1);
|
||||
if ((loc != NULL) && (loc == path))
|
||||
return (0);
|
||||
} else {
|
||||
/* Object should be in path. */
|
||||
loc = strstr(path, p_fileobj);
|
||||
if ((loc == NULL) || (loc != path))
|
||||
return (0);
|
||||
}
|
||||
}
|
||||
return (1);
|
||||
}
|
||||
|
||||
/*
|
||||
* Returns 1 if the following pass the selection rules:
|
||||
*
|
||||
* before-time,
|
||||
* after time,
|
||||
* date,
|
||||
* class,
|
||||
* event
|
||||
*/
|
||||
static int
|
||||
select_hdr32(tokenstr_t tok, uint32_t *optchkd)
|
||||
{
|
||||
|
||||
SETOPT((*optchkd), (OPT_A | OPT_a | OPT_b | OPT_c | OPT_m));
|
||||
|
||||
/* The A option overrides a, b and d. */
|
||||
if (!ISOPTSET(opttochk, OPT_A)) {
|
||||
if (ISOPTSET(opttochk, OPT_a)) {
|
||||
if (difftime((time_t)tok.tt.hdr32.s, p_atime) < 0) {
|
||||
/* Record was created before p_atime. */
|
||||
return (0);
|
||||
}
|
||||
}
|
||||
|
||||
if (ISOPTSET(opttochk, OPT_b)) {
|
||||
if (difftime(p_btime, (time_t)tok.tt.hdr32.s) < 0) {
|
||||
/* Record was created after p_btime. */
|
||||
return (0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (ISOPTSET(opttochk, OPT_c)) {
|
||||
/*
|
||||
* Check if the classes represented by the event matches
|
||||
* given class.
|
||||
*/
|
||||
if (au_preselect(tok.tt.hdr32.e_type, &maskp, AU_PRS_BOTH,
|
||||
AU_PRS_USECACHE) != 1)
|
||||
return (0);
|
||||
}
|
||||
|
||||
/* Check if event matches. */
|
||||
if (ISOPTSET(opttochk, OPT_m)) {
|
||||
if (tok.tt.hdr32.e_type != p_evtype)
|
||||
return (0);
|
||||
}
|
||||
|
||||
return (1);
|
||||
}
|
||||
|
||||
/*
|
||||
* Return 1 if checks for the the following succeed
|
||||
* auid,
|
||||
* euid,
|
||||
* egid,
|
||||
* rgid,
|
||||
* ruid,
|
||||
* process id
|
||||
*/
|
||||
static int
|
||||
select_proc32(tokenstr_t tok, uint32_t *optchkd)
|
||||
{
|
||||
|
||||
SETOPT((*optchkd), (OPT_u | OPT_e | OPT_f | OPT_g | OPT_r | OPT_op));
|
||||
|
||||
if (!select_auid(tok.tt.proc32.auid))
|
||||
return (0);
|
||||
if (!select_euid(tok.tt.proc32.euid))
|
||||
return (0);
|
||||
if (!select_egid(tok.tt.proc32.egid))
|
||||
return (0);
|
||||
if (!select_rgid(tok.tt.proc32.rgid))
|
||||
return (0);
|
||||
if (!select_ruid(tok.tt.proc32.ruid))
|
||||
return (0);
|
||||
if (!select_pidobj(tok.tt.proc32.pid))
|
||||
return (0);
|
||||
return (1);
|
||||
}
|
||||
|
||||
/*
|
||||
* Return 1 if checks for the the following succeed
|
||||
* auid,
|
||||
* euid,
|
||||
* egid,
|
||||
* rgid,
|
||||
* ruid,
|
||||
* subject id
|
||||
*/
|
||||
static int
|
||||
select_subj32(tokenstr_t tok, uint32_t *optchkd)
|
||||
{
|
||||
|
||||
SETOPT((*optchkd), (OPT_u | OPT_e | OPT_f | OPT_g | OPT_r | OPT_j));
|
||||
|
||||
if (!select_auid(tok.tt.subj32.auid))
|
||||
return (0);
|
||||
if (!select_euid(tok.tt.subj32.euid))
|
||||
return (0);
|
||||
if (!select_egid(tok.tt.subj32.egid))
|
||||
return (0);
|
||||
if (!select_rgid(tok.tt.subj32.rgid))
|
||||
return (0);
|
||||
if (!select_ruid(tok.tt.subj32.ruid))
|
||||
return (0);
|
||||
if (!select_subid(tok.tt.subj32.pid))
|
||||
return (0);
|
||||
return (1);
|
||||
}
|
||||
|
||||
/*
|
||||
* Read each record from the audit trail. Check if it is selected after
|
||||
* passing through each of the options
|
||||
*/
|
||||
static int
|
||||
select_records(FILE *fp)
|
||||
{
|
||||
u_char *buf;
|
||||
tokenstr_t tok;
|
||||
int reclen;
|
||||
int bytesread;
|
||||
int selected;
|
||||
uint32_t optchkd;
|
||||
|
||||
int err = 0;
|
||||
while ((reclen = au_read_rec(fp, &buf)) != -1) {
|
||||
optchkd = 0;
|
||||
bytesread = 0;
|
||||
selected = 1;
|
||||
while ((selected == 1) && (bytesread < reclen)) {
|
||||
if (-1 == au_fetch_tok(&tok, buf + bytesread,
|
||||
reclen - bytesread)) {
|
||||
/* Is this an incomplete record? */
|
||||
err = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
* For each token type we have have different
|
||||
* selection criteria.
|
||||
*/
|
||||
switch(tok.id) {
|
||||
case AU_HEADER_32_TOKEN:
|
||||
selected = select_hdr32(tok,
|
||||
&optchkd);
|
||||
break;
|
||||
|
||||
case AU_PROCESS_32_TOKEN:
|
||||
selected = select_proc32(tok,
|
||||
&optchkd);
|
||||
break;
|
||||
|
||||
case AU_SUBJECT_32_TOKEN:
|
||||
selected = select_subj32(tok,
|
||||
&optchkd);
|
||||
break;
|
||||
|
||||
case AU_IPC_TOKEN:
|
||||
selected = select_ipcobj(
|
||||
tok.tt.ipc.type, tok.tt.ipc.id,
|
||||
&optchkd);
|
||||
break;
|
||||
|
||||
case AU_FILE_TOKEN:
|
||||
selected = select_filepath(
|
||||
tok.tt.file.name, &optchkd);
|
||||
break;
|
||||
|
||||
case AU_PATH_TOKEN:
|
||||
selected = select_filepath(
|
||||
tok.tt.path.path, &optchkd);
|
||||
break;
|
||||
|
||||
/*
|
||||
* The following tokens dont have any relevant
|
||||
* attributes that we can select upon.
|
||||
*/
|
||||
case AU_TRAILER_TOKEN:
|
||||
case AU_ARG32_TOKEN:
|
||||
case AU_ATTR32_TOKEN:
|
||||
case AU_EXIT_TOKEN:
|
||||
case AU_NEWGROUPS_TOKEN:
|
||||
case AU_IN_ADDR_TOKEN:
|
||||
case AU_IP_TOKEN:
|
||||
case AU_IPCPERM_TOKEN:
|
||||
case AU_IPORT_TOKEN:
|
||||
case AU_OPAQUE_TOKEN:
|
||||
case AU_RETURN_32_TOKEN:
|
||||
case AU_SEQ_TOKEN:
|
||||
case AU_TEXT_TOKEN:
|
||||
case AU_ARB_TOKEN:
|
||||
case AU_SOCK_TOKEN:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
bytesread += tok.len;
|
||||
}
|
||||
if ((selected == 1) && (!err)) {
|
||||
/* Check if all the options were matched. */
|
||||
if (!(opttochk & ~optchkd)) {
|
||||
/* XXX Write this record to the output file. */
|
||||
/* default to stdout */
|
||||
fwrite(buf, 1, reclen, stdout);
|
||||
}
|
||||
}
|
||||
free(buf);
|
||||
}
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* The -o option has the form object_type=object_value. Identify the object
|
||||
* components.
|
||||
*/
|
||||
void
|
||||
parse_object_type(char *name, char *val)
|
||||
{
|
||||
if (val == NULL)
|
||||
return;
|
||||
|
||||
if (!strcmp(name, FILEOBJ)) {
|
||||
p_fileobj = val;
|
||||
SETOPT(opttochk, OPT_of);
|
||||
} else if (!strcmp(name, MSGQIDOBJ)) {
|
||||
p_msgqobj = val;
|
||||
SETOPT(opttochk, OPT_om);
|
||||
} else if (!strcmp(name, PIDOBJ)) {
|
||||
p_pidobj = val;
|
||||
SETOPT(opttochk, OPT_op);
|
||||
} else if (!strcmp(name, SEMIDOBJ)) {
|
||||
p_semobj = val;
|
||||
SETOPT(opttochk, OPT_ose);
|
||||
} else if (!strcmp(name, SHMIDOBJ)) {
|
||||
p_shmobj = val;
|
||||
SETOPT(opttochk, OPT_osh);
|
||||
} else if (!strcmp(name, SOCKOBJ)) {
|
||||
p_sockobj = val;
|
||||
SETOPT(opttochk, OPT_oso);
|
||||
} else
|
||||
usage("unknown value for -o");
|
||||
}
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
struct group *grp;
|
||||
struct passwd *pw;
|
||||
struct tm tm;
|
||||
au_event_t *n;
|
||||
FILE *fp;
|
||||
int i;
|
||||
char *objval, *converr;
|
||||
int ch;
|
||||
char timestr[128];
|
||||
char *fname;
|
||||
|
||||
converr = NULL;
|
||||
|
||||
while ((ch = getopt(argc, argv, "Aa:b:c:d:e:f:g:j:m:o:r:u:")) != -1) {
|
||||
switch(ch) {
|
||||
case 'A':
|
||||
SETOPT(opttochk, OPT_A);
|
||||
break;
|
||||
|
||||
case 'a':
|
||||
if (ISOPTSET(opttochk, OPT_a)) {
|
||||
usage("d is exclusive with a and b");
|
||||
}
|
||||
SETOPT(opttochk, OPT_a);
|
||||
strptime(optarg, "%Y%m%d%H%M%S", &tm);
|
||||
strftime(timestr, sizeof(timestr), "%Y%m%d%H%M%S",
|
||||
&tm);
|
||||
/* fprintf(stderr, "Time converted = %s\n", timestr); */
|
||||
p_atime = mktime(&tm);
|
||||
break;
|
||||
|
||||
case 'b':
|
||||
if (ISOPTSET(opttochk, OPT_b)) {
|
||||
usage("d is exclusive with a and b");
|
||||
}
|
||||
SETOPT(opttochk, OPT_b);
|
||||
strptime(optarg, "%Y%m%d%H%M%S", &tm);
|
||||
strftime(timestr, sizeof(timestr), "%Y%m%d%H%M%S",
|
||||
&tm);
|
||||
/* fprintf(stderr, "Time converted = %s\n", timestr); */
|
||||
p_btime = mktime(&tm);
|
||||
break;
|
||||
|
||||
case 'c':
|
||||
if (0 != getauditflagsbin(optarg, &maskp)) {
|
||||
/* Incorrect class */
|
||||
usage("Incorrect class");
|
||||
}
|
||||
SETOPT(opttochk, OPT_c);
|
||||
break;
|
||||
|
||||
case 'd':
|
||||
if (ISOPTSET(opttochk, OPT_b) || ISOPTSET(opttochk,
|
||||
OPT_a))
|
||||
usage("'d' is exclusive with 'a' and 'b'");
|
||||
SETOPT(opttochk, OPT_d);
|
||||
strptime(optarg, "%Y%m%d", &tm);
|
||||
strftime(timestr, sizeof(timestr), "%Y%m%d", &tm);
|
||||
/* fprintf(stderr, "Time converted = %s\n", timestr); */
|
||||
p_atime = mktime(&tm);
|
||||
tm.tm_hour = 23;
|
||||
tm.tm_min = 59;
|
||||
tm.tm_sec = 59;
|
||||
strftime(timestr, sizeof(timestr), "%Y%m%d", &tm);
|
||||
/* fprintf(stderr, "Time converted = %s\n", timestr); */
|
||||
p_btime = mktime(&tm);
|
||||
break;
|
||||
|
||||
case 'e':
|
||||
p_euid = strtol(optarg, &converr, 10);
|
||||
if (*converr != '\0') {
|
||||
/* Try the actual name */
|
||||
if ((pw = getpwnam(optarg)) == NULL)
|
||||
break;
|
||||
p_euid = pw->pw_uid;
|
||||
}
|
||||
SETOPT(opttochk, OPT_e);
|
||||
break;
|
||||
|
||||
case 'f':
|
||||
p_egid = strtol(optarg, &converr, 10);
|
||||
if (*converr != '\0') {
|
||||
/* Try actual group name. */
|
||||
if ((grp = getgrnam(optarg)) == NULL)
|
||||
break;
|
||||
p_egid = grp->gr_gid;
|
||||
}
|
||||
SETOPT(opttochk, OPT_f);
|
||||
break;
|
||||
|
||||
case 'g':
|
||||
p_rgid = strtol(optarg, &converr, 10);
|
||||
if (*converr != '\0') {
|
||||
/* Try actual group name. */
|
||||
if ((grp = getgrnam(optarg)) == NULL)
|
||||
break;
|
||||
p_rgid = grp->gr_gid;
|
||||
}
|
||||
SETOPT(opttochk, OPT_g);
|
||||
break;
|
||||
|
||||
case 'j':
|
||||
p_subid = strtol(optarg, (char **)NULL, 10);
|
||||
SETOPT(opttochk, OPT_j);
|
||||
break;
|
||||
|
||||
case 'm':
|
||||
p_evtype = strtol(optarg, (char **)NULL, 10);
|
||||
if (p_evtype == 0) {
|
||||
/* Could be the string representation. */
|
||||
n = getauevnonam(optarg);
|
||||
if (n == NULL)
|
||||
usage("Incorrect event name");
|
||||
p_evtype = *n;
|
||||
free(n);
|
||||
}
|
||||
SETOPT(opttochk, OPT_m);
|
||||
break;
|
||||
|
||||
case 'o':
|
||||
objval = strchr(optarg, '=');
|
||||
if (objval != NULL) {
|
||||
*objval = '\0';
|
||||
objval += 1;
|
||||
parse_object_type(optarg, objval);
|
||||
}
|
||||
break;
|
||||
|
||||
case 'r':
|
||||
p_ruid = strtol(optarg, &converr, 10);
|
||||
if (*converr != '\0') {
|
||||
if ((pw = getpwnam(optarg)) == NULL)
|
||||
break;
|
||||
p_ruid = pw->pw_uid;
|
||||
}
|
||||
SETOPT(opttochk, OPT_r);
|
||||
break;
|
||||
|
||||
case 'u':
|
||||
p_auid = strtol(optarg, &converr, 10);
|
||||
if (*converr != '\0') {
|
||||
if ((pw = getpwnam(optarg)) == NULL)
|
||||
break;
|
||||
p_auid = pw->pw_uid;
|
||||
}
|
||||
SETOPT(opttochk, OPT_u);
|
||||
break;
|
||||
|
||||
case '?':
|
||||
default:
|
||||
usage("Unknown option");
|
||||
}
|
||||
}
|
||||
argv += optind;
|
||||
argc -= optind;
|
||||
|
||||
if (argc == 0)
|
||||
usage("Filename needed");
|
||||
|
||||
/*
|
||||
* XXX: We should actually be merging records here.
|
||||
*/
|
||||
for (i = 0; i < argc; i++) {
|
||||
fname = argv[i];
|
||||
fp = fopen(fname, "r");
|
||||
if (fp == NULL)
|
||||
errx(EXIT_FAILURE, "Couldn't open %s", fname);
|
||||
if (select_records(fp) == -1) {
|
||||
errx(EXIT_FAILURE, "Couldn't select records %s",
|
||||
fname);
|
||||
}
|
||||
fclose(fp);
|
||||
}
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
15
contrib/openbsm/bsm/Makefile.am
Normal file
15
contrib/openbsm/bsm/Makefile.am
Normal file
@ -0,0 +1,15 @@
|
||||
#
|
||||
# $P4: //depot/projects/trustedbsd/openbsm/bsm/Makefile.am#2 $
|
||||
#
|
||||
|
||||
openbsmdir = $(includedir)/bsm
|
||||
|
||||
openbsm_HEADERS = \
|
||||
audit.h \
|
||||
audit_filter.h \
|
||||
audit_internal.h \
|
||||
audit_kevents.h \
|
||||
audit_record.h \
|
||||
audit_uevents.h \
|
||||
libbsm.h
|
||||
|
405
contrib/openbsm/bsm/Makefile.in
Normal file
405
contrib/openbsm/bsm/Makefile.in
Normal file
@ -0,0 +1,405 @@
|
||||
# Makefile.in generated by automake 1.9.6 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
#
|
||||
# $P4: //depot/projects/trustedbsd/openbsm/bsm/Makefile.in#4 $
|
||||
#
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = ..
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
subdir = bsm
|
||||
DIST_COMMON = $(openbsm_HEADERS) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/config/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
|
||||
am__installdirs = "$(DESTDIR)$(openbsmdir)"
|
||||
openbsmHEADERS_INSTALL = $(INSTALL_HEADER)
|
||||
HEADERS = $(openbsm_HEADERS)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
ECHO = @ECHO@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
FFLAGS = @FFLAGS@
|
||||
HAVE_AUDIT_SYSCALLS_FALSE = @HAVE_AUDIT_SYSCALLS_FALSE@
|
||||
HAVE_AUDIT_SYSCALLS_TRUE = @HAVE_AUDIT_SYSCALLS_TRUE@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAINT = @MAINT@
|
||||
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
|
||||
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
ac_ct_RANLIB = @ac_ct_RANLIB@
|
||||
ac_ct_STRIP = @ac_ct_STRIP@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
|
||||
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
datadir = @datadir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
openbsmdir = $(includedir)/bsm
|
||||
openbsm_HEADERS = \
|
||||
audit.h \
|
||||
audit_filter.h \
|
||||
audit_internal.h \
|
||||
audit_kevents.h \
|
||||
audit_record.h \
|
||||
audit_uevents.h \
|
||||
libbsm.h
|
||||
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign bsm/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign bsm/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool
|
||||
uninstall-info-am:
|
||||
install-openbsmHEADERS: $(openbsm_HEADERS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(openbsmdir)" || $(mkdir_p) "$(DESTDIR)$(openbsmdir)"
|
||||
@list='$(openbsm_HEADERS)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
f=$(am__strip_dir) \
|
||||
echo " $(openbsmHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(openbsmdir)/$$f'"; \
|
||||
$(openbsmHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(openbsmdir)/$$f"; \
|
||||
done
|
||||
|
||||
uninstall-openbsmHEADERS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(openbsm_HEADERS)'; for p in $$list; do \
|
||||
f=$(am__strip_dir) \
|
||||
echo " rm -f '$(DESTDIR)$(openbsmdir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(openbsmdir)/$$f"; \
|
||||
done
|
||||
|
||||
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; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
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; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
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; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(HEADERS)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(openbsmdir)"; do \
|
||||
test -z "$$dir" || $(mkdir_p) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic distclean-libtool \
|
||||
distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am: install-openbsmHEADERS
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-info-am uninstall-openbsmHEADERS
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
|
||||
clean-libtool 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-exec install-exec-am install-info \
|
||||
install-info-am install-man install-openbsmHEADERS \
|
||||
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-info-am \
|
||||
uninstall-openbsmHEADERS
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
5
contrib/openbsm/etc/audit_filter
Normal file
5
contrib/openbsm/etc/audit_filter
Normal file
@ -0,0 +1,5 @@
|
||||
#
|
||||
# $P4: //depot/projects/trustedbsd/openbsm/etc/audit_filter#1 $
|
||||
#
|
||||
# modulename:various arguments here
|
||||
#
|
37
contrib/openbsm/libbsm/Makefile.am
Normal file
37
contrib/openbsm/libbsm/Makefile.am
Normal file
@ -0,0 +1,37 @@
|
||||
#
|
||||
# $P4: //depot/projects/trustedbsd/openbsm/libbsm/Makefile.am#3 $
|
||||
#
|
||||
|
||||
INCLUDES = -I$(top_srcdir)
|
||||
|
||||
lib_LTLIBRARIES = libbsm.la
|
||||
|
||||
libbsm_la_SOURCES = \
|
||||
bsm_audit.c \
|
||||
bsm_class.c \
|
||||
bsm_control.c \
|
||||
bsm_event.c \
|
||||
bsm_flags.c \
|
||||
bsm_io.c \
|
||||
bsm_mask.c \
|
||||
bsm_token.c \
|
||||
bsm_user.c
|
||||
|
||||
if HAVE_AUDIT_SYSCALLS
|
||||
libbsm_la_SOURCES += \
|
||||
bsm_notify.c \
|
||||
bsm_wrappers.c
|
||||
endif
|
||||
|
||||
man3_MANS = \
|
||||
au_class.3 \
|
||||
au_control.3 \
|
||||
au_event.3 \
|
||||
au_free_token.3 \
|
||||
au_io.3 \
|
||||
au_mask.3 \
|
||||
au_open.3 \
|
||||
au_token.3 \
|
||||
au_user.3 \
|
||||
libbsm.3
|
||||
|
543
contrib/openbsm/libbsm/Makefile.in
Normal file
543
contrib/openbsm/libbsm/Makefile.in
Normal file
@ -0,0 +1,543 @@
|
||||
# Makefile.in generated by automake 1.9.6 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
#
|
||||
# $P4: //depot/projects/trustedbsd/openbsm/libbsm/Makefile.in#4 $
|
||||
#
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = ..
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
@HAVE_AUDIT_SYSCALLS_TRUE@am__append_1 = \
|
||||
@HAVE_AUDIT_SYSCALLS_TRUE@ bsm_notify.c \
|
||||
@HAVE_AUDIT_SYSCALLS_TRUE@ bsm_wrappers.c
|
||||
|
||||
subdir = libbsm
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/config/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
|
||||
am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(man3dir)"
|
||||
libLTLIBRARIES_INSTALL = $(INSTALL)
|
||||
LTLIBRARIES = $(lib_LTLIBRARIES)
|
||||
libbsm_la_LIBADD =
|
||||
am__libbsm_la_SOURCES_DIST = bsm_audit.c bsm_class.c bsm_control.c \
|
||||
bsm_event.c bsm_flags.c bsm_io.c bsm_mask.c bsm_token.c \
|
||||
bsm_user.c bsm_notify.c bsm_wrappers.c
|
||||
@HAVE_AUDIT_SYSCALLS_TRUE@am__objects_1 = bsm_notify.lo \
|
||||
@HAVE_AUDIT_SYSCALLS_TRUE@ bsm_wrappers.lo
|
||||
am_libbsm_la_OBJECTS = bsm_audit.lo bsm_class.lo bsm_control.lo \
|
||||
bsm_event.lo bsm_flags.lo bsm_io.lo bsm_mask.lo bsm_token.lo \
|
||||
bsm_user.lo $(am__objects_1)
|
||||
libbsm_la_OBJECTS = $(am_libbsm_la_OBJECTS)
|
||||
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/config
|
||||
depcomp = $(SHELL) $(top_srcdir)/config/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
|
||||
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
||||
$(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
SOURCES = $(libbsm_la_SOURCES)
|
||||
DIST_SOURCES = $(am__libbsm_la_SOURCES_DIST)
|
||||
man3dir = $(mandir)/man3
|
||||
NROFF = nroff
|
||||
MANS = $(man3_MANS)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
ECHO = @ECHO@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
FFLAGS = @FFLAGS@
|
||||
HAVE_AUDIT_SYSCALLS_FALSE = @HAVE_AUDIT_SYSCALLS_FALSE@
|
||||
HAVE_AUDIT_SYSCALLS_TRUE = @HAVE_AUDIT_SYSCALLS_TRUE@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAINT = @MAINT@
|
||||
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
|
||||
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
ac_ct_RANLIB = @ac_ct_RANLIB@
|
||||
ac_ct_STRIP = @ac_ct_STRIP@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
|
||||
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
datadir = @datadir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
INCLUDES = -I$(top_srcdir)
|
||||
lib_LTLIBRARIES = libbsm.la
|
||||
libbsm_la_SOURCES = bsm_audit.c bsm_class.c bsm_control.c bsm_event.c \
|
||||
bsm_flags.c bsm_io.c bsm_mask.c bsm_token.c bsm_user.c \
|
||||
$(am__append_1)
|
||||
man3_MANS = \
|
||||
au_class.3 \
|
||||
au_control.3 \
|
||||
au_event.3 \
|
||||
au_free_token.3 \
|
||||
au_io.3 \
|
||||
au_mask.3 \
|
||||
au_open.3 \
|
||||
au_token.3 \
|
||||
au_user.3 \
|
||||
libbsm.3
|
||||
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .lo .o .obj
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign libbsm/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign libbsm/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
|
||||
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
f=$(am__strip_dir) \
|
||||
echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
|
||||
$(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
uninstall-libLTLIBRARIES:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
||||
p=$(am__strip_dir) \
|
||||
echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
|
||||
$(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
|
||||
done
|
||||
|
||||
clean-libLTLIBRARIES:
|
||||
-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
|
||||
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
||||
dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
|
||||
test "$$dir" != "$$p" || dir=.; \
|
||||
echo "rm -f \"$${dir}/so_locations\""; \
|
||||
rm -f "$${dir}/so_locations"; \
|
||||
done
|
||||
libbsm.la: $(libbsm_la_OBJECTS) $(libbsm_la_DEPENDENCIES)
|
||||
$(LINK) -rpath $(libdir) $(libbsm_la_LDFLAGS) $(libbsm_la_OBJECTS) $(libbsm_la_LIBADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bsm_audit.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bsm_class.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bsm_control.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bsm_event.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bsm_flags.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bsm_io.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bsm_mask.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bsm_notify.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bsm_token.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bsm_user.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bsm_wrappers.Plo@am__quote@
|
||||
|
||||
.c.o:
|
||||
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
|
||||
|
||||
.c.obj:
|
||||
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
|
||||
|
||||
.c.lo:
|
||||
@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool
|
||||
uninstall-info-am:
|
||||
install-man3: $(man3_MANS) $(man_MANS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(man3dir)" || $(mkdir_p) "$(DESTDIR)$(man3dir)"
|
||||
@list='$(man3_MANS) $(dist_man3_MANS) $(nodist_man3_MANS)'; \
|
||||
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
|
||||
for i in $$l2; do \
|
||||
case "$$i" in \
|
||||
*.3*) list="$$list $$i" ;; \
|
||||
esac; \
|
||||
done; \
|
||||
for i in $$list; do \
|
||||
if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
|
||||
else file=$$i; fi; \
|
||||
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
|
||||
case "$$ext" in \
|
||||
3*) ;; \
|
||||
*) ext='3' ;; \
|
||||
esac; \
|
||||
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
|
||||
inst=`echo $$inst | sed -e 's/^.*\///'`; \
|
||||
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
|
||||
echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man3dir)/$$inst'"; \
|
||||
$(INSTALL_DATA) "$$file" "$(DESTDIR)$(man3dir)/$$inst"; \
|
||||
done
|
||||
uninstall-man3:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(man3_MANS) $(dist_man3_MANS) $(nodist_man3_MANS)'; \
|
||||
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
|
||||
for i in $$l2; do \
|
||||
case "$$i" in \
|
||||
*.3*) list="$$list $$i" ;; \
|
||||
esac; \
|
||||
done; \
|
||||
for i in $$list; do \
|
||||
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
|
||||
case "$$ext" in \
|
||||
3*) ;; \
|
||||
*) ext='3' ;; \
|
||||
esac; \
|
||||
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
|
||||
inst=`echo $$inst | sed -e 's/^.*\///'`; \
|
||||
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
|
||||
echo " rm -f '$(DESTDIR)$(man3dir)/$$inst'"; \
|
||||
rm -f "$(DESTDIR)$(man3dir)/$$inst"; \
|
||||
done
|
||||
|
||||
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; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
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; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
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; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(LTLIBRARIES) $(MANS)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(man3dir)"; do \
|
||||
test -z "$$dir" || $(mkdir_p) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
|
||||
mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-libtool distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am: install-man
|
||||
|
||||
install-exec-am: install-libLTLIBRARIES
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-man: install-man3
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
|
||||
mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES uninstall-man
|
||||
|
||||
uninstall-man: uninstall-man3
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
|
||||
clean-libLTLIBRARIES clean-libtool ctags distclean \
|
||||
distclean-compile 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-exec \
|
||||
install-exec-am install-info install-info-am \
|
||||
install-libLTLIBRARIES install-man install-man3 install-strip \
|
||||
installcheck installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-compile \
|
||||
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
|
||||
tags uninstall uninstall-am uninstall-info-am \
|
||||
uninstall-libLTLIBRARIES uninstall-man uninstall-man3
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
149
contrib/openbsm/libbsm/au_open.3
Normal file
149
contrib/openbsm/libbsm/au_open.3
Normal file
@ -0,0 +1,149 @@
|
||||
.\"-
|
||||
.\" Copyright (c) 2006 Robert N. M. Watson
|
||||
.\" All rights reserved.
|
||||
.\"
|
||||
.\" Redistribution and use in source and binary forms, with or without
|
||||
.\" modification, are permitted provided that the following conditions
|
||||
.\" are met:
|
||||
.\" 1. Redistributions of source code must retain the above copyright
|
||||
.\" notice, this list of conditions and the following disclaimer.
|
||||
.\" 2. Redistributions in binary form must reproduce the above copyright
|
||||
.\" notice, this list of conditions and the following disclaimer in the
|
||||
.\" documentation and/or other materials provided with the distribution.
|
||||
.\"
|
||||
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.\" $P4: //depot/projects/trustedbsd/openbsm/libbsm/au_open.3#4 $
|
||||
.\"
|
||||
.Dd March 4, 2006
|
||||
.Dt AU_OPEN 3
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm au_open ,
|
||||
.Nm au_write ,
|
||||
.Nm au_close ,
|
||||
.Nm au_close_buffer
|
||||
.Nd "Create and commit audit records"
|
||||
.Sh LIBRARY
|
||||
.Lb libbsm
|
||||
.Sh SYNOPSIS
|
||||
.In libbsm.h
|
||||
.Ft int
|
||||
.Fn au_open "void"
|
||||
.Ft int
|
||||
.Fn au_write "int d" "token_t *tok"
|
||||
.Ft int
|
||||
.Fn au_close "int d" "int keep" "short event"
|
||||
.Ft int
|
||||
.Fn au_close_buffer "int d" "short event" "u_char *buffer" "size_t *buflen"
|
||||
.Ft int
|
||||
.Fn au_close_token "token_t *tok" "u_char *buffer" "size_t *buflen"
|
||||
.Sh DESCRIPTION
|
||||
These interfaces allow applications to allocate audit records, construct a
|
||||
record using a series of tokens, and commit the audit record to the system
|
||||
event log.
|
||||
An extension API is also provided to commit the record to an in-memory
|
||||
buffer rather than the system audit log.
|
||||
.Pp
|
||||
The
|
||||
.Fn au_open
|
||||
interface allocates a new audit record descriptor.
|
||||
.Pp
|
||||
The
|
||||
.Fn au_write
|
||||
interface adds a token to an allocated audit descriptor.
|
||||
When a token has been successfully added to a record, the caller no longer
|
||||
owns the token memory, and does not need to free it directly via a call to
|
||||
.Xr au_free_token 3 .
|
||||
.Pp
|
||||
The
|
||||
.Fn au_close
|
||||
function is used to commit an audit record to the system audit log, or
|
||||
abandon the record.
|
||||
In either cases, all resources associated with the record will be released.
|
||||
The
|
||||
.Va keep
|
||||
argument determines the behavior: a value of
|
||||
.Dv AU_TO_WRITE
|
||||
causes the record to be committed; a value of
|
||||
.Dv AU_TO_NO_WRITE
|
||||
causes it to be abandoned.
|
||||
When the audit record is committed, a BSM header will be inserted before
|
||||
tokens added to the record, using the event identifier passed via
|
||||
.Va event ,
|
||||
and a trailer added to the end.
|
||||
Committing a record to the system audit log requires privilege.
|
||||
.Pp
|
||||
The
|
||||
.Fn au_close_buffer
|
||||
function writes the resulting record to an in-memory buffer of size
|
||||
.Va *buflen ;
|
||||
it will write back the filled buffer length into the same variable.
|
||||
The argument
|
||||
.Va short
|
||||
is the event identifier to use in the record header.
|
||||
.Pp
|
||||
The
|
||||
.Fn au_close_token
|
||||
function generates the BSM stream output for a single token,
|
||||
.Va tok ,
|
||||
in the passed buffer
|
||||
.Va buffer .
|
||||
The initial buffer size and resulting data size are passed via
|
||||
.Va *buflen .
|
||||
.Fn au_close_token
|
||||
will free the token before returning.
|
||||
.Sh RETURN VALUES
|
||||
The function
|
||||
.Fn au_open
|
||||
returns a non-negative audit record descriptor number on success, or a
|
||||
negative value on failure, along with error information in
|
||||
.Va errno .
|
||||
.Pp
|
||||
The functions
|
||||
.Fn au_write ,
|
||||
.Fn au_close ,
|
||||
.Fn au_close_buffer ,
|
||||
and
|
||||
.Fn au_close_token
|
||||
return 0 on success, or a negative value on failure, along with error
|
||||
information in
|
||||
.Va errno .
|
||||
.Sh SEE ALSO
|
||||
.Xr libbsm 3
|
||||
.Sh AUTHORS
|
||||
This software was created by Robert Watson, Wayne Salamon, and Suresh
|
||||
Krishnaswamy for McAfee Research, the security research division of McAfee,
|
||||
Inc., under contract to Apple Computer, Inc.
|
||||
.Pp
|
||||
The Basic Security Module (BSM) interface to audit records and audit event
|
||||
stream format were defined by Sun Microsystems.
|
||||
.Sh HISTORY
|
||||
The OpenBSM implementation was created by McAfee Research, the security
|
||||
division of McAfee Inc., under contract to Apple Computer, Inc., in 2004.
|
||||
It was subsequently adopted by the TrustedBSD Project as the foundation for
|
||||
the OpenBSM distribution.
|
||||
.Sh BUGS
|
||||
Currently,
|
||||
.Fn au_open
|
||||
does not reserve kernel resources necessary to commit the record to the
|
||||
trail; on systems supporting
|
||||
.Fn au_close ,
|
||||
the call will block until resources are available to commit the record.
|
||||
However, this leads to the possibility of an action being permitted without
|
||||
the record being guaranteed to go to disk.
|
||||
Ideally,
|
||||
.Fn au_open
|
||||
would reserve resources necessary to commit any submitted record, releasing
|
||||
them on
|
||||
.Fn au_close .
|
126
contrib/openbsm/libbsm/audit_submit.3
Normal file
126
contrib/openbsm/libbsm/audit_submit.3
Normal file
@ -0,0 +1,126 @@
|
||||
.\"
|
||||
.\" Copyright (c) 2006 Christian S.J. Peron
|
||||
.\" All rights reserved.
|
||||
.\"
|
||||
.\" Redistribution and use in source and binary forms, with or without
|
||||
.\" modification, are permitted provided that the following conditions
|
||||
.\" are met:
|
||||
.\"
|
||||
.\" 1. Redistributions of source code must retain the above copyright
|
||||
.\" notice, this list of conditions and the following disclaimer.
|
||||
.\" 2. Redistributions in binary form must reproduce the above copyright
|
||||
.\" notice, this list of conditions and the following disclaimer in the
|
||||
.\" documentation and/or other materials provided with the distribution.
|
||||
.\" 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
|
||||
.\" its contributors may be used to endorse or promote products derived
|
||||
.\" from this software without specific prior written permission.
|
||||
.\"
|
||||
.\" THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND
|
||||
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
.\" ARE DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR
|
||||
.\" ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||
.\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
.\" POSSIBILITY OF SUCH DAMAGE.
|
||||
.\"
|
||||
.\" $P4: //depot/projects/trustedbsd/openbsm/libbsm/audit_submit.3#8 $
|
||||
.\"
|
||||
.Dd May 29, 2006
|
||||
.Dt audit_submit 3
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm audit_submit
|
||||
.Nd general purpose audit record submission
|
||||
.Sh LIBRARY
|
||||
.Lb libbsm
|
||||
.Sh SYNOPSIS
|
||||
.In stdio.h
|
||||
.Ft int
|
||||
.Fn audit_submit "short au_event" "au_id_t auid" "char status" "int reterr" "const char * restrict format" ...
|
||||
.Sh DESCRIPTION
|
||||
The
|
||||
.Nm
|
||||
function provides a generic programming interface for audit record submission.
|
||||
This audit record will contain a header, subject token, an optional text token,
|
||||
return token, and a trailer.
|
||||
The header will contain the event class specified by
|
||||
.Fa au_event .
|
||||
The subject token will be generated based on
|
||||
.Fa au_ctx .
|
||||
The return token is dependant on the
|
||||
.Fa status
|
||||
and
|
||||
.Fa reterr
|
||||
arguments.
|
||||
Optionally, a text token will be created as a part of this record.
|
||||
.Pp
|
||||
Text token output is under the control of a
|
||||
.Fa format
|
||||
string that specifies how subsequent arguments (or arguments accessed via the
|
||||
variable-length argument facilities of
|
||||
.Xr stdarg 3 )
|
||||
are converted for output.
|
||||
If
|
||||
.Fa format
|
||||
is NULL, then no text token is created in the audit record.
|
||||
.Pp
|
||||
It should be noted that
|
||||
.Nm
|
||||
assumes that
|
||||
.Xr setaudit 2 ,
|
||||
or
|
||||
.Xr setaudit_addr 2
|
||||
has already been called.
|
||||
As a direct result, the terminal ID for the
|
||||
subject will be retrieved from the kernel via
|
||||
.Xr getaudit 2 ,
|
||||
or
|
||||
.Xr getaudit_addr 2 .
|
||||
.Sh EXAMPLES
|
||||
.Bd -literal -offset indent
|
||||
#include <bsm/audit.h>
|
||||
#include <bsm/libbsm.h>
|
||||
#include <bsm/audit_uevents.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <errno.h>
|
||||
|
||||
int
|
||||
audit_bad_su(char *from_login, char *to_login)
|
||||
{
|
||||
int error;
|
||||
|
||||
error = audit_submit(AUE_su, getuid(), 1, EPERM,
|
||||
"bad su from %s to %s", from_login, to_login);
|
||||
return (error);
|
||||
}
|
||||
.Ed
|
||||
.Pp
|
||||
Will generate the following audit record:
|
||||
.Bd -literal -offset indent
|
||||
header,94,1,su(1),0,Mon Apr 17 23:23:59 2006, + 271 msec
|
||||
subject,root,root,wheel,root,wheel,652,652,0,0.0.0.0
|
||||
text,bad su from from csjp to root
|
||||
return,failure : Operation not permitted,1
|
||||
trailer,94
|
||||
.Ed
|
||||
.Sh SEE ALSO
|
||||
.Xr auditon 2 ,
|
||||
.Xr getaudit 2 ,
|
||||
.Xr libbsm 3 ,
|
||||
.Xr stdarg 3
|
||||
.Sh HISTORY
|
||||
The
|
||||
.Nm
|
||||
function first appeared in OpenBSM version 1.0.
|
||||
OpenBSM 1.0 was introduced in FreeBSD 7.0.
|
||||
.Sh AUTHORS
|
||||
The
|
||||
.Nm
|
||||
function was written by
|
||||
.An Christian S.J. Peron Aq csjp@FreeBSD.org .
|
450
contrib/openbsm/libbsm/bsm_wrappers.c
Normal file
450
contrib/openbsm/libbsm/bsm_wrappers.c
Normal file
@ -0,0 +1,450 @@
|
||||
/*
|
||||
* Copyright (c) 2004 Apple Computer, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
|
||||
* its contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $P4: //depot/projects/trustedbsd/openbsm/libbsm/bsm_wrappers.c#23 $
|
||||
*/
|
||||
|
||||
#ifdef __APPLE__
|
||||
#define _SYS_AUDIT_H /* Prevent include of sys/audit.h. */
|
||||
#endif
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#ifdef __APPLE__
|
||||
#include <sys/queue.h> /* Our bsm/audit.h doesn't include queue.h. */
|
||||
#endif
|
||||
|
||||
#include <sys/sysctl.h>
|
||||
|
||||
#include <bsm/libbsm.h>
|
||||
|
||||
#include <unistd.h>
|
||||
#include <syslog.h>
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
|
||||
/* These are not advertised in libbsm.h */
|
||||
int audit_set_terminal_port(dev_t *p);
|
||||
int audit_set_terminal_host(uint32_t *m);
|
||||
|
||||
/*
|
||||
* General purpose audit submission mechanism for userspace.
|
||||
*/
|
||||
int
|
||||
audit_submit(short au_event, au_id_t auid, char status,
|
||||
int reterr, const char *fmt, ...)
|
||||
{
|
||||
char text[MAX_AUDITSTRING_LEN];
|
||||
token_t *token;
|
||||
long acond;
|
||||
va_list ap;
|
||||
pid_t pid;
|
||||
int error, afd;
|
||||
struct auditinfo ai;
|
||||
|
||||
if (auditon(A_GETCOND, &acond, sizeof(acond)) < 0) {
|
||||
/*
|
||||
* If auditon(2) returns ENOSYS, then audit has not been
|
||||
* compiled into the kernel, so just return.
|
||||
*/
|
||||
if (errno == ENOSYS)
|
||||
return (0);
|
||||
error = errno;
|
||||
syslog(LOG_AUTH | LOG_ERR, "audit: auditon failed: %s",
|
||||
strerror(errno));
|
||||
errno = error;
|
||||
return (-1);
|
||||
}
|
||||
if (acond == AUC_NOAUDIT)
|
||||
return (0);
|
||||
afd = au_open();
|
||||
if (afd < 0) {
|
||||
error = errno;
|
||||
syslog(LOG_AUTH | LOG_ERR, "audit: au_open failed: %s",
|
||||
strerror(errno));
|
||||
errno = error;
|
||||
return (-1);
|
||||
}
|
||||
if (getaudit(&ai) < 0) {
|
||||
error = errno;
|
||||
syslog(LOG_AUTH | LOG_ERR, "audit: getaudit failed: %s",
|
||||
strerror(errno));
|
||||
errno = error;
|
||||
return (-1);
|
||||
}
|
||||
pid = getpid();
|
||||
token = au_to_subject32(auid, geteuid(), getegid(),
|
||||
getuid(), getgid(), pid, pid, &ai.ai_termid);
|
||||
if (token == NULL) {
|
||||
syslog(LOG_AUTH | LOG_ERR,
|
||||
"audit: unable to build subject token");
|
||||
(void) au_close(afd, AU_TO_NO_WRITE, au_event);
|
||||
errno = EPERM;
|
||||
return (-1);
|
||||
}
|
||||
if (au_write(afd, token) < 0) {
|
||||
error = errno;
|
||||
syslog(LOG_AUTH | LOG_ERR,
|
||||
"audit: au_write failed: %s", strerror(errno));
|
||||
(void) au_close(afd, AU_TO_NO_WRITE, au_event);
|
||||
errno = error;
|
||||
return (-1);
|
||||
}
|
||||
if (fmt != NULL) {
|
||||
va_start(ap, fmt);
|
||||
(void) vsnprintf(text, MAX_AUDITSTRING_LEN, fmt, ap);
|
||||
va_end(ap);
|
||||
token = au_to_text(text);
|
||||
if (token == NULL) {
|
||||
syslog(LOG_AUTH | LOG_ERR,
|
||||
"audit: failed to generate text token");
|
||||
(void) au_close(afd, AU_TO_NO_WRITE, au_event);
|
||||
errno = EPERM;
|
||||
return (-1);
|
||||
}
|
||||
if (au_write(afd, token) < 0) {
|
||||
error = errno;
|
||||
syslog(LOG_AUTH | LOG_ERR,
|
||||
"audit: au_write failed: %s", strerror(errno));
|
||||
(void) au_close(afd, AU_TO_NO_WRITE, au_event);
|
||||
errno = error;
|
||||
return (-1);
|
||||
}
|
||||
}
|
||||
token = au_to_return32(status, reterr);
|
||||
if (token == NULL) {
|
||||
syslog(LOG_AUTH | LOG_ERR,
|
||||
"audit: enable to build return token");
|
||||
(void) au_close(afd, AU_TO_NO_WRITE, au_event);
|
||||
errno = EPERM;
|
||||
return (-1);
|
||||
}
|
||||
if (au_write(afd, token) < 0) {
|
||||
error = errno;
|
||||
syslog(LOG_AUTH | LOG_ERR,
|
||||
"audit: au_write failed: %s", strerror(errno));
|
||||
(void) au_close(afd, AU_TO_NO_WRITE, au_event);
|
||||
errno = error;
|
||||
return (-1);
|
||||
}
|
||||
if (au_close(afd, AU_TO_WRITE, au_event) < 0) {
|
||||
error = errno;
|
||||
syslog(LOG_AUTH | LOG_ERR, "audit: record not committed");
|
||||
errno = error;
|
||||
return (-1);
|
||||
}
|
||||
return (0);
|
||||
}
|
||||
|
||||
int
|
||||
audit_set_terminal_port(dev_t *p)
|
||||
{
|
||||
struct stat st;
|
||||
|
||||
if (p == NULL)
|
||||
return (kAUBadParamErr);
|
||||
|
||||
#ifdef NODEV
|
||||
*p = NODEV;
|
||||
#else
|
||||
*p = -1;
|
||||
#endif
|
||||
|
||||
/* for /usr/bin/login, try fstat() first */
|
||||
if (fstat(STDIN_FILENO, &st) != 0) {
|
||||
if (errno != EBADF) {
|
||||
syslog(LOG_ERR, "fstat() failed (%s)",
|
||||
strerror(errno));
|
||||
return (kAUStatErr);
|
||||
}
|
||||
if (stat("/dev/console", &st) != 0) {
|
||||
syslog(LOG_ERR, "stat() failed (%s)",
|
||||
strerror(errno));
|
||||
return (kAUStatErr);
|
||||
}
|
||||
}
|
||||
*p = st.st_rdev;
|
||||
return (kAUNoErr);
|
||||
}
|
||||
|
||||
int
|
||||
audit_set_terminal_host(uint32_t *m)
|
||||
{
|
||||
|
||||
#ifdef KERN_HOSTID
|
||||
int name[2] = { CTL_KERN, KERN_HOSTID };
|
||||
size_t len;
|
||||
|
||||
if (m == NULL)
|
||||
return (kAUBadParamErr);
|
||||
*m = 0;
|
||||
len = sizeof(*m);
|
||||
if (sysctl(name, 2, m, &len, NULL, 0) != 0) {
|
||||
syslog(LOG_ERR, "sysctl() failed (%s)", strerror(errno));
|
||||
return (kAUSysctlErr);
|
||||
}
|
||||
return (kAUNoErr);
|
||||
#else
|
||||
*m = -1;
|
||||
return (kAUNoErr);
|
||||
#endif
|
||||
}
|
||||
|
||||
int
|
||||
audit_set_terminal_id(au_tid_t *tid)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if (tid == NULL)
|
||||
return (kAUBadParamErr);
|
||||
if ((ret = audit_set_terminal_port(&tid->port)) != kAUNoErr)
|
||||
return (ret);
|
||||
return (audit_set_terminal_host(&tid->machine));
|
||||
}
|
||||
|
||||
/*
|
||||
* This is OK for those callers who have only one token to write. If you have
|
||||
* multiple tokens that logically form part of the same audit record, you need
|
||||
* to use the existing au_open()/au_write()/au_close() API:
|
||||
*
|
||||
* aufd = au_open();
|
||||
* tok = au_to_random_token_1(...);
|
||||
* au_write(aufd, tok);
|
||||
* tok = au_to_random_token_2(...);
|
||||
* au_write(aufd, tok);
|
||||
* ...
|
||||
* au_close(aufd, AU_TO_WRITE, AUE_your_event_type);
|
||||
*
|
||||
* Assumes, like all wrapper calls, that the caller has previously checked
|
||||
* that auditing is enabled via the audit_get_state() call.
|
||||
*
|
||||
* XXX: Should be more robust against bad arguments.
|
||||
*/
|
||||
int
|
||||
audit_write(short event_code, token_t *subject, token_t *misctok, char retval,
|
||||
int errcode)
|
||||
{
|
||||
int aufd;
|
||||
char *func = "audit_write()";
|
||||
token_t *rettok;
|
||||
|
||||
if ((aufd = au_open()) == -1) {
|
||||
au_free_token(subject);
|
||||
au_free_token(misctok);
|
||||
syslog(LOG_ERR, "%s: au_open() failed", func);
|
||||
return (kAUOpenErr);
|
||||
}
|
||||
|
||||
/* Save subject. */
|
||||
if (subject && au_write(aufd, subject) == -1) {
|
||||
au_free_token(subject);
|
||||
au_free_token(misctok);
|
||||
(void)au_close(aufd, AU_TO_WRITE, event_code);
|
||||
syslog(LOG_ERR, "%s: write of subject failed", func);
|
||||
return (kAUWriteSubjectTokErr);
|
||||
}
|
||||
|
||||
/* Save the event-specific token. */
|
||||
if (misctok && au_write(aufd, misctok) == -1) {
|
||||
au_free_token(misctok);
|
||||
(void)au_close(aufd, AU_TO_NO_WRITE, event_code);
|
||||
syslog(LOG_ERR, "%s: write of caller token failed", func);
|
||||
return (kAUWriteCallerTokErr);
|
||||
}
|
||||
|
||||
/* Tokenize and save the return value. */
|
||||
if ((rettok = au_to_return32(retval, errcode)) == NULL) {
|
||||
(void)au_close(aufd, AU_TO_NO_WRITE, event_code);
|
||||
syslog(LOG_ERR, "%s: au_to_return32() failed", func);
|
||||
return (kAUMakeReturnTokErr);
|
||||
}
|
||||
|
||||
if (au_write(aufd, rettok) == -1) {
|
||||
au_free_token(rettok);
|
||||
(void)au_close(aufd, AU_TO_NO_WRITE, event_code);
|
||||
syslog(LOG_ERR, "%s: write of return code failed", func);
|
||||
return (kAUWriteReturnTokErr);
|
||||
}
|
||||
|
||||
/*
|
||||
* We assume the caller wouldn't have bothered with this
|
||||
* function if it hadn't already decided to keep the record.
|
||||
*/
|
||||
if (au_close(aufd, AU_TO_WRITE, event_code) < 0) {
|
||||
syslog(LOG_ERR, "%s: au_close() failed", func);
|
||||
return (kAUCloseErr);
|
||||
}
|
||||
|
||||
return (kAUNoErr);
|
||||
}
|
||||
|
||||
/*
|
||||
* Same caveats as audit_write(). In addition, this function explicitly
|
||||
* assumes success; use audit_write_failure() on error.
|
||||
*/
|
||||
int
|
||||
audit_write_success(short event_code, token_t *tok, au_id_t auid, uid_t euid,
|
||||
gid_t egid, uid_t ruid, gid_t rgid, pid_t pid, au_asid_t sid,
|
||||
au_tid_t *tid)
|
||||
{
|
||||
char *func = "audit_write_success()";
|
||||
token_t *subject = NULL;
|
||||
|
||||
/* Tokenize and save subject. */
|
||||
subject = au_to_subject32(auid, euid, egid, ruid, rgid, pid, sid,
|
||||
tid);
|
||||
if (subject == NULL) {
|
||||
syslog(LOG_ERR, "%s: au_to_subject32() failed", func);
|
||||
return kAUMakeSubjectTokErr;
|
||||
}
|
||||
|
||||
return (audit_write(event_code, subject, tok, 0, 0));
|
||||
}
|
||||
|
||||
/*
|
||||
* Same caveats as audit_write(). In addition, this function explicitly
|
||||
* assumes success; use audit_write_failure_self() on error.
|
||||
*/
|
||||
int
|
||||
audit_write_success_self(short event_code, token_t *tok)
|
||||
{
|
||||
token_t *subject;
|
||||
char *func = "audit_write_success_self()";
|
||||
|
||||
if ((subject = au_to_me()) == NULL) {
|
||||
syslog(LOG_ERR, "%s: au_to_me() failed", func);
|
||||
return (kAUMakeSubjectTokErr);
|
||||
}
|
||||
|
||||
return (audit_write(event_code, subject, tok, 0, 0));
|
||||
}
|
||||
|
||||
/*
|
||||
* Same caveats as audit_write(). In addition, this function explicitly
|
||||
* assumes failure; use audit_write_success() otherwise.
|
||||
*
|
||||
* XXX This should let the caller pass an error return value rather than
|
||||
* hard-coding -1.
|
||||
*/
|
||||
int
|
||||
audit_write_failure(short event_code, char *errmsg, int errcode, au_id_t auid,
|
||||
uid_t euid, gid_t egid, uid_t ruid, gid_t rgid, pid_t pid, au_asid_t sid,
|
||||
au_tid_t *tid)
|
||||
{
|
||||
char *func = "audit_write_failure()";
|
||||
token_t *subject, *errtok;
|
||||
|
||||
subject = au_to_subject32(auid, euid, egid, ruid, rgid, pid, sid, tid);
|
||||
if (subject == NULL) {
|
||||
syslog(LOG_ERR, "%s: au_to_subject32() failed", func);
|
||||
return (kAUMakeSubjectTokErr);
|
||||
}
|
||||
|
||||
/* tokenize and save the error message */
|
||||
if ((errtok = au_to_text(errmsg)) == NULL) {
|
||||
au_free_token(subject);
|
||||
syslog(LOG_ERR, "%s: au_to_text() failed", func);
|
||||
return (kAUMakeTextTokErr);
|
||||
}
|
||||
|
||||
return (audit_write(event_code, subject, errtok, -1, errcode));
|
||||
}
|
||||
|
||||
/*
|
||||
* Same caveats as audit_write(). In addition, this function explicitly
|
||||
* assumes failure; use audit_write_success_self() otherwise.
|
||||
*
|
||||
* XXX This should let the caller pass an error return value rather than
|
||||
* hard-coding -1.
|
||||
*/
|
||||
int
|
||||
audit_write_failure_self(short event_code, char *errmsg, int errret)
|
||||
{
|
||||
char *func = "audit_write_failure_self()";
|
||||
token_t *subject, *errtok;
|
||||
|
||||
if ((subject = au_to_me()) == NULL) {
|
||||
syslog(LOG_ERR, "%s: au_to_me() failed", func);
|
||||
return (kAUMakeSubjectTokErr);
|
||||
}
|
||||
/* tokenize and save the error message */
|
||||
if ((errtok = au_to_text(errmsg)) == NULL) {
|
||||
au_free_token(subject);
|
||||
syslog(LOG_ERR, "%s: au_to_text() failed", func);
|
||||
return (kAUMakeTextTokErr);
|
||||
}
|
||||
return (audit_write(event_code, subject, errtok, -1, errret));
|
||||
}
|
||||
|
||||
/*
|
||||
* For auditing errors during login. Such errors are implicitly
|
||||
* non-attributable (i.e., not ascribable to any user).
|
||||
*
|
||||
* Assumes, like all wrapper calls, that the caller has previously checked
|
||||
* that auditing is enabled via the audit_get_state() call.
|
||||
*/
|
||||
int
|
||||
audit_write_failure_na(short event_code, char *errmsg, int errret, uid_t euid,
|
||||
uid_t egid, pid_t pid, au_tid_t *tid)
|
||||
{
|
||||
|
||||
return (audit_write_failure(event_code, errmsg, errret, -1, euid,
|
||||
egid, -1, -1, pid, -1, tid));
|
||||
}
|
||||
|
||||
/* END OF au_write() WRAPPERS */
|
||||
|
||||
#ifdef __APPLE__
|
||||
void
|
||||
audit_token_to_au32(audit_token_t atoken, uid_t *auidp, uid_t *euidp,
|
||||
gid_t *egidp, uid_t *ruidp, gid_t *rgidp, pid_t *pidp, au_asid_t *asidp,
|
||||
au_tid_t *tidp)
|
||||
{
|
||||
|
||||
if (auidp != NULL)
|
||||
*auidp = (uid_t)atoken.val[0];
|
||||
if (euidp != NULL)
|
||||
*euidp = (uid_t)atoken.val[1];
|
||||
if (egidp != NULL)
|
||||
*egidp = (gid_t)atoken.val[2];
|
||||
if (ruidp != NULL)
|
||||
*ruidp = (uid_t)atoken.val[3];
|
||||
if (rgidp != NULL)
|
||||
*rgidp = (gid_t)atoken.val[4];
|
||||
if (pidp != NULL)
|
||||
*pidp = (pid_t)atoken.val[5];
|
||||
if (asidp != NULL)
|
||||
*asidp = (au_asid_t)atoken.val[6];
|
||||
if (tidp != NULL) {
|
||||
audit_set_terminal_host(&tidp->machine);
|
||||
tidp->port = (dev_t)atoken.val[7];
|
||||
}
|
||||
}
|
||||
#endif /* !__APPLE__ */
|
216
contrib/openbsm/libbsm/libbsm.3
Normal file
216
contrib/openbsm/libbsm/libbsm.3
Normal file
@ -0,0 +1,216 @@
|
||||
.\"-
|
||||
.\" Copyright (c) 2005-2006 Robert N. M. Watson
|
||||
.\" All rights reserved.
|
||||
.\"
|
||||
.\" Redistribution and use in source and binary forms, with or without
|
||||
.\" modification, are permitted provided that the following conditions
|
||||
.\" are met:
|
||||
.\" 1. Redistributions of source code must retain the above copyright
|
||||
.\" notice, this list of conditions and the following disclaimer.
|
||||
.\" 2. Redistributions in binary form must reproduce the above copyright
|
||||
.\" notice, this list of conditions and the following disclaimer in the
|
||||
.\" documentation and/or other materials provided with the distribution.
|
||||
.\"
|
||||
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
|
||||
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
|
||||
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.\" $P4: //depot/projects/trustedbsd/openbsm/libbsm/libbsm.3#5 $
|
||||
.\"
|
||||
.Dd April 19, 2005
|
||||
.Dt LIBBSM 3
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm libbsm
|
||||
.Nd "Basic Security Module (BSM) Audit API"
|
||||
.Sh LIBRARY
|
||||
.Lb libbsm
|
||||
.Sh SYNOPSIS
|
||||
.In libbsm.h
|
||||
.Sh DESCRIPTION
|
||||
The
|
||||
.Nm
|
||||
library routines provide an interface to BSM audit record streams, allowing
|
||||
both the parsing of existing audit streams, as well as the creation of new
|
||||
audit records and streams.
|
||||
.Sh INTERFACES
|
||||
.Nm
|
||||
provides a large number of Audit programming interfaces in several classes:
|
||||
event stream interfaces, class interfaces, control interfaces, event
|
||||
interfaces, I/O interfaces, mask interfaces, notification interfaces, token
|
||||
interfaces, and user interfaces.
|
||||
These are described respectively in the
|
||||
.Xr au_class 3 ,
|
||||
.Xr au_control 3 ,
|
||||
.Xr au_event 3 ,
|
||||
.Xr au_mask 3 ,
|
||||
.Xr au_notify 3 ,
|
||||
.Xr au_stream 3 ,
|
||||
.Xr au_token 3 ,
|
||||
.Xr au_user 3
|
||||
man pages.
|
||||
.Ss Audit Event Stream Interfaces
|
||||
Audit event stream interfaces support interaction with file-backed audit
|
||||
event streams:
|
||||
.Xr au_close 3 .
|
||||
.Xr au_free_token 3 ,
|
||||
.Xr au_open 3 ,
|
||||
.Xr au_write 3 ,
|
||||
.Ss Audit Class Interfaces
|
||||
Audit class interfaces support the look up of information from the
|
||||
.Xr audit_class 5
|
||||
database:
|
||||
.Xr endauclass 3 ,
|
||||
.Xr getauclassent 3 ,
|
||||
.Xr getauclassent_r 3 ,
|
||||
.Xr getauclassnam 3 ,
|
||||
.Xr getauclassnam_r 3 ,
|
||||
.Xr setauclass 3 .
|
||||
.Ss Audit Control Interfaces
|
||||
Audit control interfaces support the look up of information from the
|
||||
.Xr audit_control 5
|
||||
database:
|
||||
.Xr endac 3 ,
|
||||
.Xr setac 3 ,
|
||||
.Xr getacdir 3 ,
|
||||
.Xr getacflg 3 ,
|
||||
.Xr getacmin 3 ,
|
||||
.Xr getacna 3 .
|
||||
.Ss Audit Event Interfaces
|
||||
Audit event interfaces support the look up of information from the
|
||||
.Xr audit_event 5
|
||||
database:
|
||||
.Xr endauevent 3 ,
|
||||
.Xr setauevent 3 ,
|
||||
.Xr getauevent 3 ,
|
||||
.Xr getauevent_r 3 ,
|
||||
.Xr getauevnam 3 ,
|
||||
.Xr getauevnam_r 3 ,
|
||||
.Xr getauevnonam 3 ,
|
||||
.Xr getauevnonam_r 3 ,
|
||||
.Xr getauevnum 3 ,
|
||||
.Xr getauevnum_r 3 .
|
||||
.Ss Audit I/O Interfaces
|
||||
Audit I/O interfaces support the processing and printing of tokens, as well
|
||||
as the reading of audit records:
|
||||
.Xr au_fetch_tok 3 ,
|
||||
.Xr au_print_tok 3 ,
|
||||
.Xr au_read_rec 3 .
|
||||
.Ss Audit Mask Interfaces
|
||||
Audit mask interfaces convert support the conversion between strings and
|
||||
.Vt au_mask_t
|
||||
values.
|
||||
They may also be used to determine if a particular audit event is matched
|
||||
by a mask:
|
||||
.Xr au_preselect 3 ,
|
||||
.Xr getauditflagsbin 3 ,
|
||||
.Xr getauditflagschar 3 .
|
||||
.Ss Audit Notification Interfaces
|
||||
Audit notification routines track audit state in a form permitting efficient
|
||||
update, avoiding frequent system calls to check the kernel audit state:
|
||||
.Xr au_get_state 3 ,
|
||||
.Xr au_notify_initialize 3 ,
|
||||
.Xr au_notify_terminate 3 .
|
||||
These interfaces are implemented only for Darwin/Mac OS X.
|
||||
.Ss Audit Token Interface
|
||||
Audit token interfaces permit the creation of tokens for use in creating
|
||||
audit records for submission to event streams.
|
||||
Each interface converts a C type to its
|
||||
.Vt token_t
|
||||
representation.
|
||||
.Xr au_to_arg 3 ,
|
||||
.Xr au_to_arg32 3 ,
|
||||
.Xr au_to_arg64 3 ,
|
||||
.Xr au_to_attr64 3 ,
|
||||
.Xr au_to_data 3 ,
|
||||
.Xr au_to_exec_args 3 ,
|
||||
.Xr au_to_exec_env 3 ,
|
||||
.Xr au_to_exit 3 ,
|
||||
.Xr au_to_file 3 ,
|
||||
.Xr au_to_groups 3 ,
|
||||
.Xr au_to_header32 3 ,
|
||||
.Xr au_to_header64 3 ,
|
||||
.Xr au_to_in_addr 3 ,
|
||||
.Xr au_to_in_addr_ex 3 ,
|
||||
.Xr au_to_ip 3 ,
|
||||
.Xr au_to_ipc 3 ,
|
||||
.Xr au_to_ipc_perm 3 ,
|
||||
.Xr au_to_iport 3 ,
|
||||
.Xr au_to_me 3 ,
|
||||
.Xr au_to_newgroups 3 ,
|
||||
.Xr au_to_opaque 3 ,
|
||||
.Xr au_to_path 3 ,
|
||||
.Xr au_to_process 3 ,
|
||||
.Xr au_to_process32 3 ,
|
||||
.Xr au_to_process64 3 ,
|
||||
.Xr au_to_process_ex 3 ,
|
||||
.Xr au_to_process32_ex 3 ,
|
||||
.Xr au_to_process64_ex 3 ,
|
||||
.Xr au_to_return 3 ,
|
||||
.Xr au_to_return32 3 ,
|
||||
.Xr au_to_return64 3 ,
|
||||
.Xr au_to_seq 3 ,
|
||||
.Xr au_to_sock_inet 3 ,
|
||||
.Xr au_to_sock_inet32 3 ,
|
||||
.Xr au_to_sock_inet128 3 ,
|
||||
.Xr au_to_subject 3 ,
|
||||
.Xr au_to_subject32 3 ,
|
||||
.Xr au_to_subject64 3 ,
|
||||
.Xr au_to_subject_ex 3 ,
|
||||
.Xr au_to_subject32_ex 3 ,
|
||||
.Xr au_to_subject64_ex 3 ,
|
||||
.Xr au_to_text 3 ,
|
||||
.Xr au_to_trailer 3 .
|
||||
.Ss Audit User Interfaces
|
||||
Audit user interfaces support the look up of information from the
|
||||
.Xr audit_user 5
|
||||
database:
|
||||
.Xr au_user_mask 3 ,
|
||||
.Xr endauuser 3 ,
|
||||
.Xr setauuser 3 ,
|
||||
.Xr getauuserent 3 ,
|
||||
.Xr getauuserent_r 3 ,
|
||||
.Xr getauusernam 3 ,
|
||||
.Xr getauusernam_r 3 ,
|
||||
.Xr getfauditflags 3 .
|
||||
.Sh SEE ALSO
|
||||
.Xr au_class 3 ,
|
||||
.Xr au_mask 3 ,
|
||||
.Xr au_notify 3 ,
|
||||
.Xr au_stream 3 ,
|
||||
.Xr au_token 3 ,
|
||||
.Xr au_user 3 ,
|
||||
.Xr audit_class 5 ,
|
||||
.Xr audit_control 5
|
||||
.Sh AUTHORS
|
||||
This software was created by Robert Watson, Wayne Salamon, and Suresh
|
||||
Krishnaswamy for McAfee Research, the security research division of McAfee,
|
||||
Inc., under contract to Apple Computer, Inc.
|
||||
.Pp
|
||||
The Basic Security Module (BSM) interface to audit records and audit event
|
||||
stream format were defined by Sun Microsystems.
|
||||
.Sh HISTORY
|
||||
The OpenBSM implementation was created by McAfee Research, the security
|
||||
division of McAfee Inc., under contract to Apple Computer, Inc., in 2004.
|
||||
It was subsequently adopted by the TrustedBSD Project as the foundation for
|
||||
the OpenBSM distribution.
|
||||
.Sh BUGS
|
||||
Bugs would not be unlikely.
|
||||
.Pp
|
||||
The
|
||||
.Nm
|
||||
library implementations are generally thread-safe, but not reentrant.
|
||||
.Pp
|
||||
The assignment of routines to classes could use some work, as it is
|
||||
decidely ad hoc.
|
||||
For example,
|
||||
.Fn au_read_rec
|
||||
should probably be considered a stream routine.
|
78
contrib/openbsm/man/auditctl.2
Normal file
78
contrib/openbsm/man/auditctl.2
Normal file
@ -0,0 +1,78 @@
|
||||
.\"-
|
||||
.\" Copyright (c) 2005-2006 Robert N. M. Watson
|
||||
.\" All rights reserved.
|
||||
.\"
|
||||
.\" Redistribution and use in source and binary forms, with or without
|
||||
.\" modification, are permitted provided that the following conditions
|
||||
.\" are met:
|
||||
.\" 1. Redistributions of source code must retain the above copyright
|
||||
.\" notice, this list of conditions and the following disclaimer.
|
||||
.\" 2. Redistributions in binary form must reproduce the above copyright
|
||||
.\" notice, this list of conditions and the following disclaimer in the
|
||||
.\" documentation and/or other materials provided with the distribution.
|
||||
.\"
|
||||
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.\" $P4: //depot/projects/trustedbsd/openbsm/man/auditctl.2#5 $
|
||||
.\"
|
||||
.Dd April 19, 2005
|
||||
.Dt AUDITCTL 2
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm auditctl
|
||||
.Nd "Configure system audit parameters"
|
||||
.Sh SYNOPSIS
|
||||
.In bsm/audit.h
|
||||
.Ft int
|
||||
.Fn auditctl "const char *path"
|
||||
.Sh DESCRIPTION
|
||||
The
|
||||
.Fn auditctl
|
||||
system call directs the kernel to open a new audit trail log file.
|
||||
.Fn auditctl
|
||||
requires appropriate privilege.
|
||||
In the
|
||||
.Fx
|
||||
implementation,
|
||||
.Fn auditctl
|
||||
opens new files, but
|
||||
.Fn auditon
|
||||
is used to disable the audit log.
|
||||
In the Mac OS X implementation, passing
|
||||
.Va NULL
|
||||
to
|
||||
.Fn auditctl
|
||||
will disable the audit log.
|
||||
.Sh RETURN VALUES
|
||||
.Nm
|
||||
returns 0 on success, or returns -1 on failure, providing additional error
|
||||
information via
|
||||
.Va errno .
|
||||
.Sh SEE ALSO
|
||||
.Xr libbsm 3 ,
|
||||
.Xr auditd 8
|
||||
.Sh AUTHORS
|
||||
This software was created by McAfee Research, the security research division
|
||||
of McAfee, Inc., under contract to Apple Computer Inc.
|
||||
Additional authors include Wayne Salamon, Robert Watson, and SPARTA Inc.
|
||||
.Pp
|
||||
The Basic Security Module (BSM) interface to audit records and audit event
|
||||
stream format were defined by Sun Microsystems.
|
||||
.Pp
|
||||
This manual page was written by
|
||||
.An Robert Watson Aq rwatson@FreeBSD.org .
|
||||
.Sh HISTORY
|
||||
The OpenBSM implementation was created by McAfee Research, the security
|
||||
division of McAfee Inc., under contract to Apple Computer Inc. in 2004.
|
||||
It was subsequently adopted by the TrustedBSD Project as the foundation for
|
||||
the OpenBSM distribution.
|
7
contrib/openbsm/modules/Makefile.am
Normal file
7
contrib/openbsm/modules/Makefile.am
Normal file
@ -0,0 +1,7 @@
|
||||
#
|
||||
# $P4: //depot/projects/trustedbsd/openbsm/modules/Makefile.am#1 $
|
||||
#
|
||||
|
||||
SUBDIRS = \
|
||||
auditfilter_noop
|
||||
|
477
contrib/openbsm/modules/Makefile.in
Normal file
477
contrib/openbsm/modules/Makefile.in
Normal file
@ -0,0 +1,477 @@
|
||||
# Makefile.in generated by automake 1.9.6 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
#
|
||||
# $P4: //depot/projects/trustedbsd/openbsm/modules/Makefile.in#1 $
|
||||
#
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = ..
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
subdir = modules
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/config/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
|
||||
html-recursive info-recursive install-data-recursive \
|
||||
install-exec-recursive install-info-recursive \
|
||||
install-recursive installcheck-recursive installdirs-recursive \
|
||||
pdf-recursive ps-recursive uninstall-info-recursive \
|
||||
uninstall-recursive
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DIST_SUBDIRS = $(SUBDIRS)
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
ECHO = @ECHO@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
FFLAGS = @FFLAGS@
|
||||
HAVE_AUDIT_SYSCALLS_FALSE = @HAVE_AUDIT_SYSCALLS_FALSE@
|
||||
HAVE_AUDIT_SYSCALLS_TRUE = @HAVE_AUDIT_SYSCALLS_TRUE@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAINT = @MAINT@
|
||||
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
|
||||
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
ac_ct_RANLIB = @ac_ct_RANLIB@
|
||||
ac_ct_STRIP = @ac_ct_STRIP@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
|
||||
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
datadir = @datadir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
SUBDIRS = \
|
||||
auditfilter_noop
|
||||
|
||||
all: all-recursive
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign modules/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign modules/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool
|
||||
uninstall-info-am:
|
||||
|
||||
# This directory's subdirectories are mostly independent; you can cd
|
||||
# into them and run `make' without going through this Makefile.
|
||||
# To change the values of `make' variables: instead of editing Makefiles,
|
||||
# (1) if the variable is set in `config.status', edit `config.status'
|
||||
# (which will cause the Makefiles to be regenerated when you run `make');
|
||||
# (2) otherwise, pass the desired values on the `make' command line.
|
||||
$(RECURSIVE_TARGETS):
|
||||
@failcom='exit 1'; \
|
||||
for f in x $$MAKEFLAGS; do \
|
||||
case $$f in \
|
||||
*=* | --[!k]*);; \
|
||||
*k*) failcom='fail=yes';; \
|
||||
esac; \
|
||||
done; \
|
||||
dot_seen=no; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
dot_seen=yes; \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| eval $$failcom; \
|
||||
done; \
|
||||
if test "$$dot_seen" = "no"; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||
fi; test -z "$$fail"
|
||||
|
||||
mostlyclean-recursive clean-recursive distclean-recursive \
|
||||
maintainer-clean-recursive:
|
||||
@failcom='exit 1'; \
|
||||
for f in x $$MAKEFLAGS; do \
|
||||
case $$f in \
|
||||
*=* | --[!k]*);; \
|
||||
*k*) failcom='fail=yes';; \
|
||||
esac; \
|
||||
done; \
|
||||
dot_seen=no; \
|
||||
case "$@" in \
|
||||
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||
*) list='$(SUBDIRS)' ;; \
|
||||
esac; \
|
||||
rev=''; for subdir in $$list; do \
|
||||
if test "$$subdir" = "."; then :; else \
|
||||
rev="$$subdir $$rev"; \
|
||||
fi; \
|
||||
done; \
|
||||
rev="$$rev ."; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
for subdir in $$rev; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| eval $$failcom; \
|
||||
done && test -z "$$fail"
|
||||
tags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
|
||||
done
|
||||
ctags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
|
||||
done
|
||||
|
||||
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; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
|
||||
include_option=--etags-include; \
|
||||
empty_fix=.; \
|
||||
else \
|
||||
include_option=--include; \
|
||||
empty_fix=; \
|
||||
fi; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test ! -f $$subdir/TAGS || \
|
||||
tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
|
||||
fi; \
|
||||
done; \
|
||||
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; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
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; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test -d "$(distdir)/$$subdir" \
|
||||
|| $(mkdir_p) "$(distdir)/$$subdir" \
|
||||
|| exit 1; \
|
||||
distdir=`$(am__cd) $(distdir) && pwd`; \
|
||||
top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
|
||||
(cd $$subdir && \
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="$$top_distdir" \
|
||||
distdir="$$distdir/$$subdir" \
|
||||
distdir) \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-recursive
|
||||
all-am: Makefile
|
||||
installdirs: installdirs-recursive
|
||||
installdirs-am:
|
||||
install: install-recursive
|
||||
install-exec: install-exec-recursive
|
||||
install-data: install-data-recursive
|
||||
uninstall: uninstall-recursive
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-recursive
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-recursive
|
||||
|
||||
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-recursive
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic distclean-libtool \
|
||||
distclean-tags
|
||||
|
||||
dvi: dvi-recursive
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-recursive
|
||||
|
||||
info: info-recursive
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-info: install-info-recursive
|
||||
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-recursive
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-recursive
|
||||
|
||||
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||
|
||||
pdf: pdf-recursive
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-recursive
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-info-am
|
||||
|
||||
uninstall-info: uninstall-info-recursive
|
||||
|
||||
.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
|
||||
clean clean-generic clean-libtool clean-recursive ctags \
|
||||
ctags-recursive distclean distclean-generic distclean-libtool \
|
||||
distclean-recursive distclean-tags distdir dvi dvi-am html \
|
||||
html-am info info-am install install-am install-data \
|
||||
install-data-am install-exec install-exec-am install-info \
|
||||
install-info-am install-man install-strip installcheck \
|
||||
installcheck-am installdirs installdirs-am maintainer-clean \
|
||||
maintainer-clean-generic maintainer-clean-recursive \
|
||||
mostlyclean mostlyclean-generic mostlyclean-libtool \
|
||||
mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
|
||||
uninstall uninstall-am uninstall-info-am
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
10
contrib/openbsm/modules/auditfilter_noop/Makefile.am
Normal file
10
contrib/openbsm/modules/auditfilter_noop/Makefile.am
Normal file
@ -0,0 +1,10 @@
|
||||
#
|
||||
# $P4: //depot/projects/trustedbsd/openbsm/modules/auditfilter_noop/Makefile.am#1 $
|
||||
#
|
||||
|
||||
INCLUDES = -I$(top_srcdir)
|
||||
|
||||
lib_LTLIBRARIES = auditfilter_noop.la
|
||||
|
||||
auditfilter_noop_la_SOURCE = auditfilter_noop.c
|
||||
auditfilter_noop_la_LDFLAGS = -module
|
459
contrib/openbsm/modules/auditfilter_noop/Makefile.in
Normal file
459
contrib/openbsm/modules/auditfilter_noop/Makefile.in
Normal file
@ -0,0 +1,459 @@
|
||||
# Makefile.in generated by automake 1.9.6 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
#
|
||||
# $P4: //depot/projects/trustedbsd/openbsm/modules/auditfilter_noop/Makefile.in#1 $
|
||||
#
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = ../..
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
subdir = modules/auditfilter_noop
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/config/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
|
||||
am__installdirs = "$(DESTDIR)$(libdir)"
|
||||
libLTLIBRARIES_INSTALL = $(INSTALL)
|
||||
LTLIBRARIES = $(lib_LTLIBRARIES)
|
||||
auditfilter_noop_la_LIBADD =
|
||||
auditfilter_noop_la_SOURCES = auditfilter_noop.c
|
||||
auditfilter_noop_la_OBJECTS = auditfilter_noop.lo
|
||||
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/config
|
||||
depcomp = $(SHELL) $(top_srcdir)/config/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
|
||||
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
||||
$(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
SOURCES = auditfilter_noop.c
|
||||
DIST_SOURCES = auditfilter_noop.c
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
ECHO = @ECHO@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
FFLAGS = @FFLAGS@
|
||||
HAVE_AUDIT_SYSCALLS_FALSE = @HAVE_AUDIT_SYSCALLS_FALSE@
|
||||
HAVE_AUDIT_SYSCALLS_TRUE = @HAVE_AUDIT_SYSCALLS_TRUE@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAINT = @MAINT@
|
||||
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
|
||||
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
ac_ct_RANLIB = @ac_ct_RANLIB@
|
||||
ac_ct_STRIP = @ac_ct_STRIP@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
|
||||
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
datadir = @datadir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
INCLUDES = -I$(top_srcdir)
|
||||
lib_LTLIBRARIES = auditfilter_noop.la
|
||||
auditfilter_noop_la_SOURCE = auditfilter_noop.c
|
||||
auditfilter_noop_la_LDFLAGS = -module
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .lo .o .obj
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign modules/auditfilter_noop/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign modules/auditfilter_noop/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
|
||||
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
f=$(am__strip_dir) \
|
||||
echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
|
||||
$(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
uninstall-libLTLIBRARIES:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
||||
p=$(am__strip_dir) \
|
||||
echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
|
||||
$(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
|
||||
done
|
||||
|
||||
clean-libLTLIBRARIES:
|
||||
-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
|
||||
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
||||
dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
|
||||
test "$$dir" != "$$p" || dir=.; \
|
||||
echo "rm -f \"$${dir}/so_locations\""; \
|
||||
rm -f "$${dir}/so_locations"; \
|
||||
done
|
||||
auditfilter_noop.la: $(auditfilter_noop_la_OBJECTS) $(auditfilter_noop_la_DEPENDENCIES)
|
||||
$(LINK) -rpath $(libdir) $(auditfilter_noop_la_LDFLAGS) $(auditfilter_noop_la_OBJECTS) $(auditfilter_noop_la_LIBADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/auditfilter_noop.Plo@am__quote@
|
||||
|
||||
.c.o:
|
||||
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
|
||||
|
||||
.c.obj:
|
||||
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
|
||||
|
||||
.c.lo:
|
||||
@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool
|
||||
uninstall-info-am:
|
||||
|
||||
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; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
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; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
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; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(LTLIBRARIES)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(libdir)"; do \
|
||||
test -z "$$dir" || $(mkdir_p) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
|
||||
mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-libtool distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-exec-am: install-libLTLIBRARIES
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
|
||||
mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
|
||||
clean-libLTLIBRARIES clean-libtool ctags distclean \
|
||||
distclean-compile 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-exec \
|
||||
install-exec-am install-info install-info-am \
|
||||
install-libLTLIBRARIES install-man install-strip installcheck \
|
||||
installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-compile \
|
||||
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
|
||||
tags uninstall uninstall-am uninstall-info-am \
|
||||
uninstall-libLTLIBRARIES
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
6
contrib/openbsm/test/Makefile.am
Normal file
6
contrib/openbsm/test/Makefile.am
Normal file
@ -0,0 +1,6 @@
|
||||
#
|
||||
# $P4: //depot/projects/trustedbsd/openbsm/test/Makefile.am#1 $
|
||||
#
|
||||
|
||||
SUBDIRS = \
|
||||
bsm
|
477
contrib/openbsm/test/Makefile.in
Normal file
477
contrib/openbsm/test/Makefile.in
Normal file
@ -0,0 +1,477 @@
|
||||
# Makefile.in generated by automake 1.9.6 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
#
|
||||
# $P4: //depot/projects/trustedbsd/openbsm/test/Makefile.in#1 $
|
||||
#
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = ..
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
subdir = test
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/config/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
|
||||
html-recursive info-recursive install-data-recursive \
|
||||
install-exec-recursive install-info-recursive \
|
||||
install-recursive installcheck-recursive installdirs-recursive \
|
||||
pdf-recursive ps-recursive uninstall-info-recursive \
|
||||
uninstall-recursive
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DIST_SUBDIRS = $(SUBDIRS)
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
ECHO = @ECHO@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
FFLAGS = @FFLAGS@
|
||||
HAVE_AUDIT_SYSCALLS_FALSE = @HAVE_AUDIT_SYSCALLS_FALSE@
|
||||
HAVE_AUDIT_SYSCALLS_TRUE = @HAVE_AUDIT_SYSCALLS_TRUE@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAINT = @MAINT@
|
||||
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
|
||||
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
ac_ct_RANLIB = @ac_ct_RANLIB@
|
||||
ac_ct_STRIP = @ac_ct_STRIP@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
|
||||
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
datadir = @datadir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
SUBDIRS = \
|
||||
bsm
|
||||
|
||||
all: all-recursive
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign test/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign test/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool
|
||||
uninstall-info-am:
|
||||
|
||||
# This directory's subdirectories are mostly independent; you can cd
|
||||
# into them and run `make' without going through this Makefile.
|
||||
# To change the values of `make' variables: instead of editing Makefiles,
|
||||
# (1) if the variable is set in `config.status', edit `config.status'
|
||||
# (which will cause the Makefiles to be regenerated when you run `make');
|
||||
# (2) otherwise, pass the desired values on the `make' command line.
|
||||
$(RECURSIVE_TARGETS):
|
||||
@failcom='exit 1'; \
|
||||
for f in x $$MAKEFLAGS; do \
|
||||
case $$f in \
|
||||
*=* | --[!k]*);; \
|
||||
*k*) failcom='fail=yes';; \
|
||||
esac; \
|
||||
done; \
|
||||
dot_seen=no; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
dot_seen=yes; \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| eval $$failcom; \
|
||||
done; \
|
||||
if test "$$dot_seen" = "no"; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||
fi; test -z "$$fail"
|
||||
|
||||
mostlyclean-recursive clean-recursive distclean-recursive \
|
||||
maintainer-clean-recursive:
|
||||
@failcom='exit 1'; \
|
||||
for f in x $$MAKEFLAGS; do \
|
||||
case $$f in \
|
||||
*=* | --[!k]*);; \
|
||||
*k*) failcom='fail=yes';; \
|
||||
esac; \
|
||||
done; \
|
||||
dot_seen=no; \
|
||||
case "$@" in \
|
||||
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||
*) list='$(SUBDIRS)' ;; \
|
||||
esac; \
|
||||
rev=''; for subdir in $$list; do \
|
||||
if test "$$subdir" = "."; then :; else \
|
||||
rev="$$subdir $$rev"; \
|
||||
fi; \
|
||||
done; \
|
||||
rev="$$rev ."; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
for subdir in $$rev; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| eval $$failcom; \
|
||||
done && test -z "$$fail"
|
||||
tags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
|
||||
done
|
||||
ctags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
|
||||
done
|
||||
|
||||
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; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
|
||||
include_option=--etags-include; \
|
||||
empty_fix=.; \
|
||||
else \
|
||||
include_option=--include; \
|
||||
empty_fix=; \
|
||||
fi; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test ! -f $$subdir/TAGS || \
|
||||
tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
|
||||
fi; \
|
||||
done; \
|
||||
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; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
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; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test -d "$(distdir)/$$subdir" \
|
||||
|| $(mkdir_p) "$(distdir)/$$subdir" \
|
||||
|| exit 1; \
|
||||
distdir=`$(am__cd) $(distdir) && pwd`; \
|
||||
top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
|
||||
(cd $$subdir && \
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="$$top_distdir" \
|
||||
distdir="$$distdir/$$subdir" \
|
||||
distdir) \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-recursive
|
||||
all-am: Makefile
|
||||
installdirs: installdirs-recursive
|
||||
installdirs-am:
|
||||
install: install-recursive
|
||||
install-exec: install-exec-recursive
|
||||
install-data: install-data-recursive
|
||||
uninstall: uninstall-recursive
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-recursive
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-recursive
|
||||
|
||||
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-recursive
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic distclean-libtool \
|
||||
distclean-tags
|
||||
|
||||
dvi: dvi-recursive
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-recursive
|
||||
|
||||
info: info-recursive
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-info: install-info-recursive
|
||||
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-recursive
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-recursive
|
||||
|
||||
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||
|
||||
pdf: pdf-recursive
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-recursive
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-info-am
|
||||
|
||||
uninstall-info: uninstall-info-recursive
|
||||
|
||||
.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
|
||||
clean clean-generic clean-libtool clean-recursive ctags \
|
||||
ctags-recursive distclean distclean-generic distclean-libtool \
|
||||
distclean-recursive distclean-tags distdir dvi dvi-am html \
|
||||
html-am info info-am install install-am install-data \
|
||||
install-data-am install-exec install-exec-am install-info \
|
||||
install-info-am install-man install-strip installcheck \
|
||||
installcheck-am installdirs installdirs-am maintainer-clean \
|
||||
maintainer-clean-generic maintainer-clean-recursive \
|
||||
mostlyclean mostlyclean-generic mostlyclean-libtool \
|
||||
mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
|
||||
uninstall uninstall-am uninstall-info-am
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
9
contrib/openbsm/test/bsm/Makefile.am
Normal file
9
contrib/openbsm/test/bsm/Makefile.am
Normal file
@ -0,0 +1,9 @@
|
||||
#
|
||||
# $P4: //depot/projects/trustedbsd/openbsm/test/bsm/Makefile.am#1 $
|
||||
#
|
||||
|
||||
INCLUDES = -I$(top_srcdir)
|
||||
|
||||
bin_PROGRAMS = generate
|
||||
generate_SOURCES = generate.c
|
||||
generate_LDADD = $(top_builddir)/libbsm/libbsm.la
|
453
contrib/openbsm/test/bsm/Makefile.in
Normal file
453
contrib/openbsm/test/bsm/Makefile.in
Normal file
@ -0,0 +1,453 @@
|
||||
# Makefile.in generated by automake 1.9.6 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
#
|
||||
# $P4: //depot/projects/trustedbsd/openbsm/test/bsm/Makefile.in#1 $
|
||||
#
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = ../..
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
bin_PROGRAMS = generate$(EXEEXT)
|
||||
subdir = test/bsm
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/config/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
am__installdirs = "$(DESTDIR)$(bindir)"
|
||||
binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
|
||||
PROGRAMS = $(bin_PROGRAMS)
|
||||
am_generate_OBJECTS = generate.$(OBJEXT)
|
||||
generate_OBJECTS = $(am_generate_OBJECTS)
|
||||
generate_DEPENDENCIES = $(top_builddir)/libbsm/libbsm.la
|
||||
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/config
|
||||
depcomp = $(SHELL) $(top_srcdir)/config/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
|
||||
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
||||
$(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
SOURCES = $(generate_SOURCES)
|
||||
DIST_SOURCES = $(generate_SOURCES)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
ECHO = @ECHO@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
FFLAGS = @FFLAGS@
|
||||
HAVE_AUDIT_SYSCALLS_FALSE = @HAVE_AUDIT_SYSCALLS_FALSE@
|
||||
HAVE_AUDIT_SYSCALLS_TRUE = @HAVE_AUDIT_SYSCALLS_TRUE@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAINT = @MAINT@
|
||||
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
|
||||
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
ac_ct_RANLIB = @ac_ct_RANLIB@
|
||||
ac_ct_STRIP = @ac_ct_STRIP@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
|
||||
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
datadir = @datadir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
INCLUDES = -I$(top_srcdir)
|
||||
generate_SOURCES = generate.c
|
||||
generate_LDADD = $(top_builddir)/libbsm/libbsm.la
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .lo .o .obj
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign test/bsm/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign test/bsm/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
install-binPROGRAMS: $(bin_PROGRAMS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
|
||||
@list='$(bin_PROGRAMS)'; for p in $$list; do \
|
||||
p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
|
||||
if test -f $$p \
|
||||
|| test -f $$p1 \
|
||||
; then \
|
||||
f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
|
||||
echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
|
||||
$(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
uninstall-binPROGRAMS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(bin_PROGRAMS)'; for p in $$list; do \
|
||||
f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
|
||||
echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(bindir)/$$f"; \
|
||||
done
|
||||
|
||||
clean-binPROGRAMS:
|
||||
@list='$(bin_PROGRAMS)'; for p in $$list; do \
|
||||
f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
|
||||
echo " rm -f $$p $$f"; \
|
||||
rm -f $$p $$f ; \
|
||||
done
|
||||
generate$(EXEEXT): $(generate_OBJECTS) $(generate_DEPENDENCIES)
|
||||
@rm -f generate$(EXEEXT)
|
||||
$(LINK) $(generate_LDFLAGS) $(generate_OBJECTS) $(generate_LDADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/generate.Po@am__quote@
|
||||
|
||||
.c.o:
|
||||
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
|
||||
|
||||
.c.obj:
|
||||
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
|
||||
|
||||
.c.lo:
|
||||
@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool
|
||||
uninstall-info-am:
|
||||
|
||||
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; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
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; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
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; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(PROGRAMS)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(bindir)"; do \
|
||||
test -z "$$dir" || $(mkdir_p) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-libtool distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-exec-am: install-binPROGRAMS
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
|
||||
mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-binPROGRAMS uninstall-info-am
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
|
||||
clean-generic clean-libtool ctags distclean distclean-compile \
|
||||
distclean-generic distclean-libtool distclean-tags distdir dvi \
|
||||
dvi-am html html-am info info-am install install-am \
|
||||
install-binPROGRAMS install-data install-data-am install-exec \
|
||||
install-exec-am install-info install-info-am install-man \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
|
||||
pdf pdf-am ps ps-am tags uninstall uninstall-am \
|
||||
uninstall-binPROGRAMS uninstall-info-am
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
31
etc/rc.d/auditd
Normal file
31
etc/rc.d/auditd
Normal file
@ -0,0 +1,31 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
# Start up for the Audit daemon.
|
||||
#
|
||||
|
||||
# PROVIDE: auditd
|
||||
# REQUIRE: syslogd
|
||||
# BEFORE: DAEMON
|
||||
# KEYWORD: shutdown
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name="auditd"
|
||||
stop_cmd="auditd_stop"
|
||||
command="/usr/sbin/${name}"
|
||||
rcvar="auditd_enable"
|
||||
command_args="${auditd_flags}"
|
||||
required_files="/etc/security/audit_class /etc/security/audit_control
|
||||
/etc/security/audit_event /etc/security/audit_user
|
||||
/etc/security/audit_warn"
|
||||
|
||||
auditd_stop()
|
||||
{
|
||||
|
||||
/usr/sbin/audit -t
|
||||
}
|
||||
|
||||
load_rc_config $name
|
||||
run_rc_command "$1"
|
93
etc/rc.d/bridge
Normal file
93
etc/rc.d/bridge
Normal file
@ -0,0 +1,93 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Copyright (c) 2006 The FreeBSD Project. All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE PROJECT ``AS IS'' AND ANY EXPRESS OR
|
||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
# IN NO EVENT SHALL THE PROJECT BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
# PROVIDE: bridge
|
||||
# REQUIRE: netif
|
||||
# KEYWORD: nojail
|
||||
|
||||
. /etc/rc.subr
|
||||
. /etc/network.subr
|
||||
|
||||
name="bridge"
|
||||
start_cmd="bridge_start"
|
||||
stop_cmd="bridge_stop"
|
||||
_cmd=""
|
||||
|
||||
glob_int () {
|
||||
case "$1" in
|
||||
$2 ) true ;;
|
||||
* ) false ;;
|
||||
esac
|
||||
}
|
||||
|
||||
bridge_test () {
|
||||
bridge=$1
|
||||
iface=$2
|
||||
|
||||
eval interfaces=\$autobridge_${bridge}
|
||||
if [ -n "${interfaces}" ]; then
|
||||
for i in ${interfaces}; do
|
||||
if glob_int $iface $i ; then
|
||||
ifconfig $bridge $_cmd $iface > /dev/null 2>&1
|
||||
return
|
||||
fi
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
autobridge()
|
||||
{
|
||||
if [ -n "${autobridge_interfaces}" ]; then
|
||||
if [ -z "$_iflist" ]; then
|
||||
# We're operating as a general network start routine.
|
||||
_iflist="`list_net_interfaces`"
|
||||
fi
|
||||
|
||||
for br in ${autobridge_interfaces}; do
|
||||
for i in $_iflist; do
|
||||
bridge_test $br $i
|
||||
done
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
bridge_start()
|
||||
{
|
||||
_cmd="addm"
|
||||
autobridge
|
||||
}
|
||||
|
||||
bridge_stop()
|
||||
{
|
||||
_cmd="deletem"
|
||||
autobridge
|
||||
}
|
||||
|
||||
_iflist=$2
|
||||
|
||||
load_rc_config $name
|
||||
run_rc_command "$1"
|
256
lib/libkvm/kvm_minidump_amd64.c
Normal file
256
lib/libkvm/kvm_minidump_amd64.c
Normal file
@ -0,0 +1,256 @@
|
||||
/*-
|
||||
* Copyright (c) 2006 Peter Wemm
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
/*
|
||||
* AMD64 machine dependent routines for kvm and minidumps.
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/user.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/fnv_hash.h>
|
||||
#include <stdlib.h>
|
||||
#include <strings.h>
|
||||
#include <unistd.h>
|
||||
#include <nlist.h>
|
||||
#include <kvm.h>
|
||||
|
||||
#include <vm/vm.h>
|
||||
#include <vm/vm_param.h>
|
||||
|
||||
#include <machine/elf.h>
|
||||
#include <machine/cpufunc.h>
|
||||
#include <machine/minidump.h>
|
||||
|
||||
#include <limits.h>
|
||||
|
||||
#include "kvm_private.h"
|
||||
|
||||
struct hpte {
|
||||
struct hpte *next;
|
||||
vm_paddr_t pa;
|
||||
int64_t off;
|
||||
};
|
||||
|
||||
#define HPT_SIZE 1024
|
||||
|
||||
/* minidump must be the first item! */
|
||||
struct vmstate {
|
||||
int minidump; /* 1 = minidump mode */
|
||||
struct minidumphdr hdr;
|
||||
void *hpt_head[HPT_SIZE];
|
||||
uint64_t *bitmap;
|
||||
uint64_t *ptemap;
|
||||
};
|
||||
|
||||
static void
|
||||
hpt_insert(kvm_t *kd, vm_paddr_t pa, int64_t off)
|
||||
{
|
||||
struct hpte *hpte;
|
||||
uint32_t fnv = FNV1_32_INIT;
|
||||
|
||||
fnv = fnv_32_buf(&pa, sizeof(pa), fnv);
|
||||
fnv &= (HPT_SIZE - 1);
|
||||
hpte = malloc(sizeof(*hpte));
|
||||
hpte->pa = pa;
|
||||
hpte->off = off;
|
||||
hpte->next = kd->vmst->hpt_head[fnv];
|
||||
kd->vmst->hpt_head[fnv] = hpte;
|
||||
}
|
||||
|
||||
static int64_t
|
||||
hpt_find(kvm_t *kd, vm_paddr_t pa)
|
||||
{
|
||||
struct hpte *hpte;
|
||||
uint32_t fnv = FNV1_32_INIT;
|
||||
|
||||
fnv = fnv_32_buf(&pa, sizeof(pa), fnv);
|
||||
fnv &= (HPT_SIZE - 1);
|
||||
for (hpte = kd->vmst->hpt_head[fnv]; hpte != NULL; hpte = hpte->next) {
|
||||
if (pa == hpte->pa)
|
||||
return (hpte->off);
|
||||
}
|
||||
return (-1);
|
||||
}
|
||||
|
||||
static int
|
||||
inithash(kvm_t *kd, uint64_t *base, int len, off_t off)
|
||||
{
|
||||
uint64_t idx;
|
||||
uint64_t bit, bits;
|
||||
vm_paddr_t pa;
|
||||
|
||||
for (idx = 0; idx < len / sizeof(*base); idx++) {
|
||||
bits = base[idx];
|
||||
while (bits) {
|
||||
bit = bsfq(bits);
|
||||
bits &= ~(1ul << bit);
|
||||
pa = (idx * sizeof(*base) * NBBY + bit) * PAGE_SIZE;
|
||||
hpt_insert(kd, pa, off);
|
||||
off += PAGE_SIZE;
|
||||
}
|
||||
}
|
||||
return (off);
|
||||
}
|
||||
|
||||
void
|
||||
_kvm_minidump_freevtop(kvm_t *kd)
|
||||
{
|
||||
struct vmstate *vm = kd->vmst;
|
||||
|
||||
if (vm->bitmap)
|
||||
free(vm->bitmap);
|
||||
if (vm->ptemap)
|
||||
free(vm->ptemap);
|
||||
free(vm);
|
||||
kd->vmst = NULL;
|
||||
}
|
||||
|
||||
int
|
||||
_kvm_minidump_initvtop(kvm_t *kd)
|
||||
{
|
||||
u_long pa;
|
||||
struct vmstate *vmst;
|
||||
off_t off;
|
||||
|
||||
vmst = _kvm_malloc(kd, sizeof(*vmst));
|
||||
if (vmst == 0) {
|
||||
_kvm_err(kd, kd->program, "cannot allocate vm");
|
||||
return (-1);
|
||||
}
|
||||
kd->vmst = vmst;
|
||||
bzero(vmst, sizeof(*vmst));
|
||||
vmst->minidump = 1;
|
||||
if (pread(kd->pmfd, &vmst->hdr, sizeof(vmst->hdr), 0) !=
|
||||
sizeof(vmst->hdr)) {
|
||||
_kvm_err(kd, kd->program, "cannot read dump header");
|
||||
return (-1);
|
||||
}
|
||||
if (strncmp(MINIDUMP_MAGIC, vmst->hdr.magic, sizeof(vmst->hdr.magic)) != 0) {
|
||||
_kvm_err(kd, kd->program, "not a minidump for this platform");
|
||||
return (-1);
|
||||
}
|
||||
if (vmst->hdr.version != MINIDUMP_VERSION) {
|
||||
_kvm_err(kd, kd->program, "wrong minidump version. expected %d got %d",
|
||||
MINIDUMP_VERSION, vmst->hdr.version);
|
||||
return (-1);
|
||||
}
|
||||
|
||||
/* Skip header and msgbuf */
|
||||
off = PAGE_SIZE + round_page(vmst->hdr.msgbufsize);
|
||||
|
||||
vmst->bitmap = _kvm_malloc(kd, vmst->hdr.bitmapsize);
|
||||
if (vmst->bitmap == NULL) {
|
||||
_kvm_err(kd, kd->program, "cannot allocate %d bytes for bitmap", vmst->hdr.bitmapsize);
|
||||
return (-1);
|
||||
}
|
||||
if (pread(kd->pmfd, vmst->bitmap, vmst->hdr.bitmapsize, off) !=
|
||||
vmst->hdr.bitmapsize) {
|
||||
_kvm_err(kd, kd->program, "cannot read %d bytes for page bitmap", vmst->hdr.bitmapsize);
|
||||
return (-1);
|
||||
}
|
||||
off += round_page(vmst->hdr.bitmapsize);
|
||||
|
||||
vmst->ptemap = _kvm_malloc(kd, vmst->hdr.ptesize);
|
||||
if (vmst->ptemap == NULL) {
|
||||
_kvm_err(kd, kd->program, "cannot allocate %d bytes for ptemap", vmst->hdr.ptesize);
|
||||
return (-1);
|
||||
}
|
||||
if (pread(kd->pmfd, vmst->ptemap, vmst->hdr.ptesize, off) !=
|
||||
vmst->hdr.ptesize) {
|
||||
_kvm_err(kd, kd->program, "cannot read %d bytes for ptemap", vmst->hdr.ptesize);
|
||||
return (-1);
|
||||
}
|
||||
off += vmst->hdr.ptesize;
|
||||
|
||||
/* build physical address hash table for sparse pages */
|
||||
inithash(kd, vmst->bitmap, vmst->hdr.bitmapsize, off);
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
static int
|
||||
_kvm_minidump_vatop(kvm_t *kd, u_long va, off_t *pa)
|
||||
{
|
||||
struct vmstate *vm;
|
||||
u_long offset;
|
||||
pt_entry_t pte;
|
||||
u_long pteindex;
|
||||
int i;
|
||||
u_long a;
|
||||
off_t ofs;
|
||||
|
||||
vm = kd->vmst;
|
||||
offset = va & (PAGE_SIZE - 1);
|
||||
|
||||
if (va >= vm->hdr.kernbase) {
|
||||
pteindex = (va - vm->hdr.kernbase) >> PAGE_SHIFT;
|
||||
pte = vm->ptemap[pteindex];
|
||||
if (((u_long)pte & PG_V) == 0) {
|
||||
_kvm_err(kd, kd->program, "_kvm_vatop: pte not valid");
|
||||
goto invalid;
|
||||
}
|
||||
a = pte & PG_FRAME;
|
||||
ofs = hpt_find(kd, a);
|
||||
if (ofs == -1) {
|
||||
_kvm_err(kd, kd->program, "_kvm_vatop: physical address 0x%lx not in minidump", a);
|
||||
goto invalid;
|
||||
}
|
||||
*pa = ofs + offset;
|
||||
return (PAGE_SIZE - offset);
|
||||
} else if (va >= vm->hdr.dmapbase && va < vm->hdr.dmapend) {
|
||||
a = (va - vm->hdr.dmapbase) & ~PAGE_MASK;
|
||||
ofs = hpt_find(kd, a);
|
||||
if (ofs == -1) {
|
||||
_kvm_err(kd, kd->program, "_kvm_vatop: direct map address 0x%lx not in minidump", va);
|
||||
goto invalid;
|
||||
}
|
||||
*pa = ofs + offset;
|
||||
return (PAGE_SIZE - offset);
|
||||
} else {
|
||||
_kvm_err(kd, kd->program, "_kvm_vatop: virtual address 0x%lx not minidumped", va);
|
||||
goto invalid;
|
||||
}
|
||||
|
||||
invalid:
|
||||
_kvm_err(kd, 0, "invalid address (0x%lx)", va);
|
||||
return (0);
|
||||
}
|
||||
|
||||
int
|
||||
_kvm_minidump_kvatop(kvm_t *kd, u_long va, off_t *pa)
|
||||
{
|
||||
|
||||
if (ISALIVE(kd)) {
|
||||
_kvm_err(kd, 0, "kvm_kvatop called in live kernel!");
|
||||
return (0);
|
||||
}
|
||||
return (_kvm_minidump_vatop(kd, va, pa));
|
||||
}
|
295
lib/libkvm/kvm_minidump_i386.c
Normal file
295
lib/libkvm/kvm_minidump_i386.c
Normal file
@ -0,0 +1,295 @@
|
||||
/*-
|
||||
* Copyright (c) 2006 Peter Wemm
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
/*
|
||||
* AMD64 machine dependent routines for kvm and minidumps.
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/user.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/fnv_hash.h>
|
||||
#include <stdlib.h>
|
||||
#include <strings.h>
|
||||
#include <unistd.h>
|
||||
#include <nlist.h>
|
||||
#include <kvm.h>
|
||||
|
||||
#include <vm/vm.h>
|
||||
#include <vm/vm_param.h>
|
||||
|
||||
#include <machine/elf.h>
|
||||
#include <machine/cpufunc.h>
|
||||
#include <machine/minidump.h>
|
||||
|
||||
#include <limits.h>
|
||||
|
||||
#include "kvm_private.h"
|
||||
|
||||
#define PG_FRAME_PAE (~((uint64_t)PAGE_MASK))
|
||||
|
||||
struct hpte {
|
||||
struct hpte *next;
|
||||
uint64_t pa;
|
||||
int64_t off;
|
||||
};
|
||||
|
||||
#define HPT_SIZE 1024
|
||||
|
||||
/* minidump must be the first item! */
|
||||
struct vmstate {
|
||||
int minidump; /* 1 = minidump mode */
|
||||
struct minidumphdr hdr;
|
||||
void *hpt_head[HPT_SIZE];
|
||||
uint32_t *bitmap;
|
||||
void *ptemap;
|
||||
};
|
||||
|
||||
static void
|
||||
hpt_insert(kvm_t *kd, uint64_t pa, int64_t off)
|
||||
{
|
||||
struct hpte *hpte;
|
||||
uint32_t fnv = FNV1_32_INIT;
|
||||
|
||||
fnv = fnv_32_buf(&pa, sizeof(pa), fnv);
|
||||
fnv &= (HPT_SIZE - 1);
|
||||
hpte = malloc(sizeof(*hpte));
|
||||
hpte->pa = pa;
|
||||
hpte->off = off;
|
||||
hpte->next = kd->vmst->hpt_head[fnv];
|
||||
kd->vmst->hpt_head[fnv] = hpte;
|
||||
}
|
||||
|
||||
static int64_t
|
||||
hpt_find(kvm_t *kd, uint64_t pa)
|
||||
{
|
||||
struct hpte *hpte;
|
||||
uint32_t fnv = FNV1_32_INIT;
|
||||
|
||||
fnv = fnv_32_buf(&pa, sizeof(pa), fnv);
|
||||
fnv &= (HPT_SIZE - 1);
|
||||
for (hpte = kd->vmst->hpt_head[fnv]; hpte != NULL; hpte = hpte->next) {
|
||||
if (pa == hpte->pa)
|
||||
return (hpte->off);
|
||||
}
|
||||
return (-1);
|
||||
}
|
||||
|
||||
static int
|
||||
inithash(kvm_t *kd, uint32_t *base, int len, off_t off)
|
||||
{
|
||||
uint64_t idx;
|
||||
uint32_t bit, bits;
|
||||
uint64_t pa;
|
||||
|
||||
for (idx = 0; idx < len / sizeof(*base); idx++) {
|
||||
bits = base[idx];
|
||||
while (bits) {
|
||||
bit = bsfl(bits);
|
||||
bits &= ~(1ul << bit);
|
||||
pa = (idx * sizeof(*base) * NBBY + bit) * PAGE_SIZE;
|
||||
hpt_insert(kd, pa, off);
|
||||
off += PAGE_SIZE;
|
||||
}
|
||||
}
|
||||
return (off);
|
||||
}
|
||||
|
||||
void
|
||||
_kvm_minidump_freevtop(kvm_t *kd)
|
||||
{
|
||||
struct vmstate *vm = kd->vmst;
|
||||
|
||||
if (vm->bitmap)
|
||||
free(vm->bitmap);
|
||||
if (vm->ptemap)
|
||||
free(vm->ptemap);
|
||||
free(vm);
|
||||
kd->vmst = NULL;
|
||||
}
|
||||
|
||||
int
|
||||
_kvm_minidump_initvtop(kvm_t *kd)
|
||||
{
|
||||
u_long pa;
|
||||
struct vmstate *vmst;
|
||||
off_t off;
|
||||
|
||||
vmst = _kvm_malloc(kd, sizeof(*vmst));
|
||||
if (vmst == 0) {
|
||||
_kvm_err(kd, kd->program, "cannot allocate vm");
|
||||
return (-1);
|
||||
}
|
||||
kd->vmst = vmst;
|
||||
bzero(vmst, sizeof(*vmst));
|
||||
vmst->minidump = 1;
|
||||
if (pread(kd->pmfd, &vmst->hdr, sizeof(vmst->hdr), 0) !=
|
||||
sizeof(vmst->hdr)) {
|
||||
_kvm_err(kd, kd->program, "cannot read dump header");
|
||||
return (-1);
|
||||
}
|
||||
if (strncmp(MINIDUMP_MAGIC, vmst->hdr.magic, sizeof(vmst->hdr.magic)) != 0) {
|
||||
_kvm_err(kd, kd->program, "not a minidump for this platform");
|
||||
return (-1);
|
||||
}
|
||||
if (vmst->hdr.version != MINIDUMP_VERSION) {
|
||||
_kvm_err(kd, kd->program, "wrong minidump version. expected %d got %d",
|
||||
MINIDUMP_VERSION, vmst->hdr.version);
|
||||
return (-1);
|
||||
}
|
||||
|
||||
/* Skip header and msgbuf */
|
||||
off = PAGE_SIZE + round_page(vmst->hdr.msgbufsize);
|
||||
|
||||
vmst->bitmap = _kvm_malloc(kd, vmst->hdr.bitmapsize);
|
||||
if (vmst->bitmap == NULL) {
|
||||
_kvm_err(kd, kd->program, "cannot allocate %d bytes for bitmap", vmst->hdr.bitmapsize);
|
||||
return (-1);
|
||||
}
|
||||
if (pread(kd->pmfd, vmst->bitmap, vmst->hdr.bitmapsize, off) !=
|
||||
vmst->hdr.bitmapsize) {
|
||||
_kvm_err(kd, kd->program, "cannot read %d bytes for page bitmap", vmst->hdr.bitmapsize);
|
||||
return (-1);
|
||||
}
|
||||
off += round_page(vmst->hdr.bitmapsize);
|
||||
|
||||
vmst->ptemap = _kvm_malloc(kd, vmst->hdr.ptesize);
|
||||
if (vmst->ptemap == NULL) {
|
||||
_kvm_err(kd, kd->program, "cannot allocate %d bytes for ptemap", vmst->hdr.ptesize);
|
||||
return (-1);
|
||||
}
|
||||
if (pread(kd->pmfd, vmst->ptemap, vmst->hdr.ptesize, off) !=
|
||||
vmst->hdr.ptesize) {
|
||||
_kvm_err(kd, kd->program, "cannot read %d bytes for ptemap", vmst->hdr.ptesize);
|
||||
return (-1);
|
||||
}
|
||||
off += vmst->hdr.ptesize;
|
||||
|
||||
/* build physical address hash table for sparse pages */
|
||||
inithash(kd, vmst->bitmap, vmst->hdr.bitmapsize, off);
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
static int
|
||||
_kvm_minidump_vatop_pae(kvm_t *kd, u_long va, off_t *pa)
|
||||
{
|
||||
struct vmstate *vm;
|
||||
uint64_t offset;
|
||||
uint64_t pte;
|
||||
u_long pteindex;
|
||||
int i;
|
||||
uint64_t a;
|
||||
off_t ofs;
|
||||
uint64_t *ptemap;
|
||||
|
||||
vm = kd->vmst;
|
||||
ptemap = vm->ptemap;
|
||||
offset = va & (PAGE_SIZE - 1);
|
||||
|
||||
if (va >= vm->hdr.kernbase) {
|
||||
pteindex = (va - vm->hdr.kernbase) >> PAGE_SHIFT;
|
||||
pte = ptemap[pteindex];
|
||||
if ((pte & PG_V) == 0) {
|
||||
_kvm_err(kd, kd->program, "_kvm_vatop: pte not valid");
|
||||
goto invalid;
|
||||
}
|
||||
a = pte & PG_FRAME_PAE;
|
||||
ofs = hpt_find(kd, a);
|
||||
if (ofs == -1) {
|
||||
_kvm_err(kd, kd->program, "_kvm_vatop: physical address 0x%llx not in minidump", a);
|
||||
goto invalid;
|
||||
}
|
||||
*pa = ofs + offset;
|
||||
return (PAGE_SIZE - offset);
|
||||
} else {
|
||||
_kvm_err(kd, kd->program, "_kvm_vatop: virtual address 0x%lx not minidumped", va);
|
||||
goto invalid;
|
||||
}
|
||||
|
||||
invalid:
|
||||
_kvm_err(kd, 0, "invalid address (0x%lx)", va);
|
||||
return (0);
|
||||
}
|
||||
|
||||
static int
|
||||
_kvm_minidump_vatop(kvm_t *kd, u_long va, off_t *pa)
|
||||
{
|
||||
struct vmstate *vm;
|
||||
u_long offset;
|
||||
pt_entry_t pte;
|
||||
u_long pteindex;
|
||||
int i;
|
||||
u_long a;
|
||||
off_t ofs;
|
||||
uint32_t *ptemap;
|
||||
|
||||
vm = kd->vmst;
|
||||
ptemap = vm->ptemap;
|
||||
offset = va & (PAGE_SIZE - 1);
|
||||
|
||||
if (va >= vm->hdr.kernbase) {
|
||||
pteindex = (va - vm->hdr.kernbase) >> PAGE_SHIFT;
|
||||
pte = ptemap[pteindex];
|
||||
if ((pte & PG_V) == 0) {
|
||||
_kvm_err(kd, kd->program, "_kvm_vatop: pte not valid");
|
||||
goto invalid;
|
||||
}
|
||||
a = pte & PG_FRAME;
|
||||
ofs = hpt_find(kd, a);
|
||||
if (ofs == -1) {
|
||||
_kvm_err(kd, kd->program, "_kvm_vatop: physical address 0x%lx not in minidump", a);
|
||||
goto invalid;
|
||||
}
|
||||
*pa = ofs + offset;
|
||||
return (PAGE_SIZE - offset);
|
||||
} else {
|
||||
_kvm_err(kd, kd->program, "_kvm_vatop: virtual address 0x%lx not minidumped", va);
|
||||
goto invalid;
|
||||
}
|
||||
|
||||
invalid:
|
||||
_kvm_err(kd, 0, "invalid address (0x%lx)", va);
|
||||
return (0);
|
||||
}
|
||||
|
||||
int
|
||||
_kvm_minidump_kvatop(kvm_t *kd, u_long va, off_t *pa)
|
||||
{
|
||||
|
||||
if (ISALIVE(kd)) {
|
||||
_kvm_err(kd, 0, "kvm_kvatop called in live kernel!");
|
||||
return (0);
|
||||
}
|
||||
if (kd->vmst->hdr.paemode)
|
||||
return (_kvm_minidump_vatop_pae(kd, va, pa));
|
||||
else
|
||||
return (_kvm_minidump_vatop(kd, va, pa));
|
||||
}
|
42
sys/arm/arm/inckern.S
Normal file
42
sys/arm/arm/inckern.S
Normal file
@ -0,0 +1,42 @@
|
||||
/*-
|
||||
* Copyright (c) 2005 Olivier Houchard. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "opt_kernname.h"
|
||||
|
||||
#include <machine/asm.h>
|
||||
__FBSDID("$FreeBSD$")
|
||||
ENTRY(do_call)
|
||||
mov r6, r0
|
||||
mov r0, r1
|
||||
ldr r1, =0xfff00000
|
||||
and r1, pc, r1
|
||||
mov sp, r3
|
||||
mov r3, #1
|
||||
mov pc, r6
|
||||
.section ".real_kernel","aw"
|
||||
.globl kernel_start;
|
||||
kernel_start:
|
||||
.incbin KERNNAME
|
||||
.globl kernel_end;
|
||||
kernel_end:
|
110
sys/contrib/dev/ath/ah_soc.h
Normal file
110
sys/contrib/dev/ath/ah_soc.h
Normal file
@ -0,0 +1,110 @@
|
||||
/*-
|
||||
* Copyright (c) 2006 Sam Leffler, Errno Consulting, Atheros
|
||||
* Communications, Inc. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms are permitted
|
||||
* provided that the following conditions are met:
|
||||
* 1. The materials contained herein are unmodified and are used
|
||||
* unmodified.
|
||||
* 2. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following NO
|
||||
* ''WARRANTY'' disclaimer below (''Disclaimer''), without
|
||||
* modification.
|
||||
* 3. Redistributions in binary form must reproduce at minimum a
|
||||
* disclaimer similar to the Disclaimer below and any redistribution
|
||||
* must be conditioned upon including a substantially similar
|
||||
* Disclaimer requirement for further binary redistribution.
|
||||
* 4. Neither the names of the above-listed copyright holders nor the
|
||||
* names of any contributors may be used to endorse or promote
|
||||
* product derived from this software without specific prior written
|
||||
* permission.
|
||||
*
|
||||
* NO WARRANTY
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT,
|
||||
* MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
|
||||
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
||||
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGES.
|
||||
*
|
||||
* $Id: //depot/sw/branches/sam_hal/ah_soc.h#3 $
|
||||
*/
|
||||
#ifndef _ATH_AH_SOC_H_
|
||||
#define _ATH_AH_SOC_H_
|
||||
/*
|
||||
* Atheros System on Chip (SoC) public definitions.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This is board-specific data that is stored in a "known"
|
||||
* location in flash. To find the start of this data search
|
||||
* back from the (aliased) end of flash by 0x1000 bytes at a
|
||||
* time until you find the string "5311", which marks the
|
||||
* start of Board Configuration. Typically one gives up if
|
||||
* more than 500KB is searched.
|
||||
*/
|
||||
struct ar531x_boarddata {
|
||||
u_int32_t magic; /* board data is valid */
|
||||
#define AR531X_BD_MAGIC 0x35333131 /* "5311", for all 531x platforms */
|
||||
u_int16_t cksum; /* checksum (starting with BD_REV 2) */
|
||||
u_int16_t rev; /* revision of this struct */
|
||||
#define BD_REV 4
|
||||
char boardName[64]; /* Name of board */
|
||||
u_int16_t major; /* Board major number */
|
||||
u_int16_t minor; /* Board minor number */
|
||||
u_int32_t config; /* Board configuration */
|
||||
#define BD_ENET0 0x00000001 /* ENET0 is stuffed */
|
||||
#define BD_ENET1 0x00000002 /* ENET1 is stuffed */
|
||||
#define BD_UART1 0x00000004 /* UART1 is stuffed */
|
||||
#define BD_UART0 0x00000008 /* UART0 is stuffed (dma) */
|
||||
#define BD_RSTFACTORY 0x00000010 /* Reset factory defaults stuffed */
|
||||
#define BD_SYSLED 0x00000020 /* System LED stuffed */
|
||||
#define BD_EXTUARTCLK 0x00000040 /* External UART clock */
|
||||
#define BD_CPUFREQ 0x00000080 /* cpu freq is valid in nvram */
|
||||
#define BD_SYSFREQ 0x00000100 /* sys freq is set in nvram */
|
||||
#define BD_WLAN0 0x00000200 /* Enable WLAN0 */
|
||||
#define BD_MEMCAP 0x00000400 /* CAP SDRAM @ memCap for testing */
|
||||
#define BD_DISWATCHDOG 0x00000800 /* disable system watchdog */
|
||||
#define BD_WLAN1 0x00001000 /* Enable WLAN1 (ar5212) */
|
||||
#define BD_ISCASPER 0x00002000 /* FLAG for AR2312 */
|
||||
#define BD_WLAN0_2G_EN 0x00004000 /* FLAG for radio0_2G */
|
||||
#define BD_WLAN0_5G_EN 0x00008000 /* FLAG for radio0_2G */
|
||||
#define BD_WLAN1_2G_EN 0x00020000 /* FLAG for radio0_2G */
|
||||
#define BD_WLAN1_5G_EN 0x00040000 /* FLAG for radio0_2G */
|
||||
u_int16_t resetConfigGpio; /* Reset factory GPIO pin */
|
||||
u_int16_t sysLedGpio; /* System LED GPIO pin */
|
||||
|
||||
u_int32_t cpuFreq; /* CPU core frequency in Hz */
|
||||
u_int32_t sysFreq; /* System frequency in Hz */
|
||||
u_int32_t cntFreq; /* Calculated C0_COUNT frequency */
|
||||
|
||||
u_int8_t wlan0Mac[6];
|
||||
u_int8_t enet0Mac[6];
|
||||
u_int8_t enet1Mac[6];
|
||||
|
||||
u_int16_t pciId; /* Pseudo PCIID for common code */
|
||||
u_int16_t memCap; /* cap bank1 in MB */
|
||||
|
||||
/* version 3 */
|
||||
u_int8_t wlan1Mac[6]; /* (ar5212) */
|
||||
};
|
||||
|
||||
/*
|
||||
* Board support data. The driver is required to locate
|
||||
* and fill-in this information before passing a reference to
|
||||
* this structure as the HAL_BUS_TAG parameter supplied to
|
||||
* ath_hal_attach.
|
||||
*/
|
||||
struct ar531x_config {
|
||||
const struct ar531x_boarddata *board; /* board config data */
|
||||
const char *radio; /* radio config data */
|
||||
int unit; /* unit number [0, 1] */
|
||||
void *tag; /* bus space tag */
|
||||
};
|
||||
#endif /* _ATH_AH_SOC_H_ */
|
3846
sys/contrib/dev/ath/public/ap30.hal.o.uu
Normal file
3846
sys/contrib/dev/ath/public/ap30.hal.o.uu
Normal file
File diff suppressed because it is too large
Load Diff
69
sys/contrib/dev/ath/public/ap30.inc
Normal file
69
sys/contrib/dev/ath/public/ap30.inc
Normal file
@ -0,0 +1,69 @@
|
||||
#
|
||||
# Copyright (c) 2002-2006 Sam Leffler, Errno Consulting
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer,
|
||||
# without modification.
|
||||
# 2. Redistributions in binary form must reproduce at minimum a disclaimer
|
||||
# similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any
|
||||
# redistribution must be conditioned upon including a substantially
|
||||
# similar Disclaimer requirement for further binary redistribution.
|
||||
# 3. Neither the names of the above-listed copyright holders nor the names
|
||||
# of any contributors may be used to endorse or promote products derived
|
||||
# from this software without specific prior written permission.
|
||||
#
|
||||
# Alternatively, this software may be distributed under the terms of the
|
||||
# GNU General Public License ("GPL") version 2 as published by the Free
|
||||
# Software Foundation.
|
||||
#
|
||||
# NO WARRANTY
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY
|
||||
# AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
# THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY,
|
||||
# OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
||||
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||
# THE POSSIBILITY OF SUCH DAMAGES.
|
||||
#
|
||||
# $Id: //depot/sw/branches/sam_hal/public/mipsisa32-be-elf.inc#1 $
|
||||
#
|
||||
|
||||
#
|
||||
# Configuration for building big-endian MIPS2 for the AP30 SoC
|
||||
# using the 5.01 linux-mips.org toolchain (manually moved to
|
||||
# /pub/gnu from /pub/gnu/local where rpm --prefix=/pub/gnu
|
||||
# bogusly installs them).
|
||||
#
|
||||
|
||||
#
|
||||
# http://www.linux-mips.org/toolchain.html
|
||||
#
|
||||
# /pub/gnu/bin/mips-linux-gcc -v
|
||||
# Reading specs from /pub/gnu/bin/../lib/gcc-lib/mips-linux/2.96-mips3264-000710/specs
|
||||
# gcc version 2.96-mips3264-000710
|
||||
# /pub/gnu/bin/mips-linux-as -v
|
||||
# GNU assembler version 2.12.90.0.7 (mips-linux) using BFD version 2.12.90.0.7 20020423
|
||||
|
||||
#
|
||||
ifndef TOOLPREFIX
|
||||
TOOLPREFIX= /pub/gnu/bin/mips-linux-
|
||||
endif
|
||||
#
|
||||
CC= ${TOOLPREFIX}gcc
|
||||
LD= ${TOOLPREFIX}ld
|
||||
STRIP= ${TOOLPREFIX}strip
|
||||
OBJCOPY=${TOOLPREFIX}objcopy
|
||||
NM= ${TOOLPREFIX}nm
|
||||
|
||||
LDOPTS= -EB
|
||||
COPTS+= -DAH_BYTE_ORDER=AH_BIG_ENDIAN
|
||||
COPTS+= -G 0 -EB -mno-abicalls -fno-pic -mips32 -Wa,--trap \
|
||||
-fno-strict-aliasing -fno-common -fomit-frame-pointer -mlong-calls
|
5
sys/contrib/dev/ath/public/ap30.opt_ah.h
Normal file
5
sys/contrib/dev/ath/public/ap30.opt_ah.h
Normal file
@ -0,0 +1,5 @@
|
||||
#define AH_SUPPORT_AR5212 1
|
||||
#define AH_SUPPORT_AR5312 1
|
||||
#define AH_SUPPORT_5111 1
|
||||
#define AH_SUPPORT_5112 1
|
||||
#define AH_NEED_DESC_SWAP 1
|
3830
sys/contrib/dev/ath/public/ap43.hal.o.uu
Normal file
3830
sys/contrib/dev/ath/public/ap43.hal.o.uu
Normal file
File diff suppressed because it is too large
Load Diff
69
sys/contrib/dev/ath/public/ap43.inc
Normal file
69
sys/contrib/dev/ath/public/ap43.inc
Normal file
@ -0,0 +1,69 @@
|
||||
#
|
||||
# Copyright (c) 2002-2006 Sam Leffler, Errno Consulting
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer,
|
||||
# without modification.
|
||||
# 2. Redistributions in binary form must reproduce at minimum a disclaimer
|
||||
# similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any
|
||||
# redistribution must be conditioned upon including a substantially
|
||||
# similar Disclaimer requirement for further binary redistribution.
|
||||
# 3. Neither the names of the above-listed copyright holders nor the names
|
||||
# of any contributors may be used to endorse or promote products derived
|
||||
# from this software without specific prior written permission.
|
||||
#
|
||||
# Alternatively, this software may be distributed under the terms of the
|
||||
# GNU General Public License ("GPL") version 2 as published by the Free
|
||||
# Software Foundation.
|
||||
#
|
||||
# NO WARRANTY
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY
|
||||
# AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
# THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY,
|
||||
# OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
||||
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||
# THE POSSIBILITY OF SUCH DAMAGES.
|
||||
#
|
||||
# $Id: //depot/sw/branches/sam_hal/public/mipsisa32-be-elf.inc#1 $
|
||||
#
|
||||
|
||||
#
|
||||
# Configuration for building big-endian MIPS2 for the AP43/AP48 SoC
|
||||
# using the 5.01 linux-mips.org toolchain (manually moved to
|
||||
# /pub/gnu from /pub/gnu/local where rpm --prefix=/pub/gnu
|
||||
# bogusly installs them).
|
||||
#
|
||||
|
||||
#
|
||||
# http://www.linux-mips.org/toolchain.html
|
||||
#
|
||||
# /pub/gnu/bin/mips-linux-gcc -v
|
||||
# Reading specs from /pub/gnu/bin/../lib/gcc-lib/mips-linux/2.96-mips3264-000710/specs
|
||||
# gcc version 2.96-mips3264-000710
|
||||
# /pub/gnu/bin/mips-linux-as -v
|
||||
# GNU assembler version 2.12.90.0.7 (mips-linux) using BFD version 2.12.90.0.7 20020423
|
||||
|
||||
#
|
||||
ifndef TOOLPREFIX
|
||||
TOOLPREFIX= /pub/gnu/bin/mips-linux-
|
||||
endif
|
||||
#
|
||||
CC= ${TOOLPREFIX}gcc
|
||||
LD= ${TOOLPREFIX}ld
|
||||
STRIP= ${TOOLPREFIX}strip
|
||||
OBJCOPY=${TOOLPREFIX}objcopy
|
||||
NM= ${TOOLPREFIX}nm
|
||||
|
||||
LDOPTS= -EB
|
||||
COPTS+= -DAH_BYTE_ORDER=AH_BIG_ENDIAN
|
||||
COPTS+= -G 0 -EB -mno-abicalls -fno-pic -mips32 -Wa,--trap \
|
||||
-fno-strict-aliasing -fno-common -fomit-frame-pointer -mlong-calls
|
4
sys/contrib/dev/ath/public/ap43.opt_ah.h
Normal file
4
sys/contrib/dev/ath/public/ap43.opt_ah.h
Normal file
@ -0,0 +1,4 @@
|
||||
#define AH_SUPPORT_AR5212 1
|
||||
#define AH_SUPPORT_AR5312 1
|
||||
#define AH_SUPPORT_5111 1
|
||||
#define AH_SUPPORT_5112 1
|
3588
sys/contrib/dev/ath/public/ap51.hal.o.uu
Normal file
3588
sys/contrib/dev/ath/public/ap51.hal.o.uu
Normal file
File diff suppressed because it is too large
Load Diff
69
sys/contrib/dev/ath/public/ap51.inc
Normal file
69
sys/contrib/dev/ath/public/ap51.inc
Normal file
@ -0,0 +1,69 @@
|
||||
#
|
||||
# Copyright (c) 2002-2006 Sam Leffler, Errno Consulting
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer,
|
||||
# without modification.
|
||||
# 2. Redistributions in binary form must reproduce at minimum a disclaimer
|
||||
# similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any
|
||||
# redistribution must be conditioned upon including a substantially
|
||||
# similar Disclaimer requirement for further binary redistribution.
|
||||
# 3. Neither the names of the above-listed copyright holders nor the names
|
||||
# of any contributors may be used to endorse or promote products derived
|
||||
# from this software without specific prior written permission.
|
||||
#
|
||||
# Alternatively, this software may be distributed under the terms of the
|
||||
# GNU General Public License ("GPL") version 2 as published by the Free
|
||||
# Software Foundation.
|
||||
#
|
||||
# NO WARRANTY
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY
|
||||
# AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
# THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY,
|
||||
# OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
||||
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||
# THE POSSIBILITY OF SUCH DAMAGES.
|
||||
#
|
||||
# $Id: //depot/sw/branches/sam_hal/public/mipsisa32-be-elf.inc#1 $
|
||||
#
|
||||
|
||||
#
|
||||
# Configuration for building big-endian MIPS2 for the AP51 SoC
|
||||
# using the 5.01 linux-mips.org toolchain (manually moved to
|
||||
# /pub/gnu from /pub/gnu/local where rpm --prefix=/pub/gnu
|
||||
# bogusly installs them).
|
||||
#
|
||||
|
||||
#
|
||||
# http://www.linux-mips.org/toolchain.html
|
||||
#
|
||||
# /pub/gnu/bin/mips-linux-gcc -v
|
||||
# Reading specs from /pub/gnu/bin/../lib/gcc-lib/mips-linux/2.96-mips3264-000710/specs
|
||||
# gcc version 2.96-mips3264-000710
|
||||
# /pub/gnu/bin/mips-linux-as -v
|
||||
# GNU assembler version 2.12.90.0.7 (mips-linux) using BFD version 2.12.90.0.7 20020423
|
||||
|
||||
#
|
||||
ifndef TOOLPREFIX
|
||||
TOOLPREFIX= /pub/gnu/bin/mips-linux-
|
||||
endif
|
||||
#
|
||||
CC= ${TOOLPREFIX}gcc
|
||||
LD= ${TOOLPREFIX}ld
|
||||
STRIP= ${TOOLPREFIX}strip
|
||||
OBJCOPY=${TOOLPREFIX}objcopy
|
||||
NM= ${TOOLPREFIX}nm
|
||||
|
||||
LDOPTS= -EB
|
||||
COPTS+= -DAH_BYTE_ORDER=AH_BIG_ENDIAN
|
||||
COPTS+= -G 0 -EB -mno-abicalls -fno-pic -mips32 -Wa,--trap \
|
||||
-fno-strict-aliasing -fno-common -fomit-frame-pointer -mlong-calls
|
4
sys/contrib/dev/ath/public/ap51.opt_ah.h
Normal file
4
sys/contrib/dev/ath/public/ap51.opt_ah.h
Normal file
@ -0,0 +1,4 @@
|
||||
#define AH_SUPPORT_AR5212 1
|
||||
#define AH_SUPPORT_AR5312 1
|
||||
#define AH_SUPPORT_2316 1
|
||||
#define AH_NEED_DESC_SWAP 1
|
3565
sys/contrib/dev/ath/public/ap61.hal.o.uu
Normal file
3565
sys/contrib/dev/ath/public/ap61.hal.o.uu
Normal file
File diff suppressed because it is too large
Load Diff
69
sys/contrib/dev/ath/public/ap61.inc
Normal file
69
sys/contrib/dev/ath/public/ap61.inc
Normal file
@ -0,0 +1,69 @@
|
||||
#
|
||||
# Copyright (c) 2002-2006 Sam Leffler, Errno Consulting
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer,
|
||||
# without modification.
|
||||
# 2. Redistributions in binary form must reproduce at minimum a disclaimer
|
||||
# similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any
|
||||
# redistribution must be conditioned upon including a substantially
|
||||
# similar Disclaimer requirement for further binary redistribution.
|
||||
# 3. Neither the names of the above-listed copyright holders nor the names
|
||||
# of any contributors may be used to endorse or promote products derived
|
||||
# from this software without specific prior written permission.
|
||||
#
|
||||
# Alternatively, this software may be distributed under the terms of the
|
||||
# GNU General Public License ("GPL") version 2 as published by the Free
|
||||
# Software Foundation.
|
||||
#
|
||||
# NO WARRANTY
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY
|
||||
# AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
# THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY,
|
||||
# OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
||||
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||
# THE POSSIBILITY OF SUCH DAMAGES.
|
||||
#
|
||||
# $Id: //depot/sw/branches/sam_hal/public/mipsisa32-be-elf.inc#1 $
|
||||
#
|
||||
|
||||
#
|
||||
# Configuration for building big-endian MIPS2 for the AP61 SoC
|
||||
# using the 5.01 linux-mips.org toolchain (manually moved to
|
||||
# /pub/gnu from /pub/gnu/local where rpm --prefix=/pub/gnu
|
||||
# bogusly installs them).
|
||||
#
|
||||
|
||||
#
|
||||
# http://www.linux-mips.org/toolchain.html
|
||||
#
|
||||
# /pub/gnu/bin/mips-linux-gcc -v
|
||||
# Reading specs from /pub/gnu/bin/../lib/gcc-lib/mips-linux/2.96-mips3264-000710/specs
|
||||
# gcc version 2.96-mips3264-000710
|
||||
# /pub/gnu/bin/mips-linux-as -v
|
||||
# GNU assembler version 2.12.90.0.7 (mips-linux) using BFD version 2.12.90.0.7 20020423
|
||||
|
||||
#
|
||||
ifndef TOOLPREFIX
|
||||
TOOLPREFIX= /pub/gnu/bin/mips-linux-
|
||||
endif
|
||||
#
|
||||
CC= ${TOOLPREFIX}gcc
|
||||
LD= ${TOOLPREFIX}ld
|
||||
STRIP= ${TOOLPREFIX}strip
|
||||
OBJCOPY=${TOOLPREFIX}objcopy
|
||||
NM= ${TOOLPREFIX}nm
|
||||
|
||||
LDOPTS= -EB
|
||||
COPTS+= -DAH_BYTE_ORDER=AH_BIG_ENDIAN
|
||||
COPTS+= -G 0 -EB -mno-abicalls -fno-pic -mips32 -Wa,--trap \
|
||||
-fno-strict-aliasing -fno-common -fomit-frame-pointer -mlong-calls
|
3
sys/contrib/dev/ath/public/ap61.opt_ah.h
Normal file
3
sys/contrib/dev/ath/public/ap61.opt_ah.h
Normal file
@ -0,0 +1,3 @@
|
||||
#define AH_SUPPORT_AR5212 1
|
||||
#define AH_SUPPORT_AR5312 1
|
||||
#define AH_SUPPORT_2317 1
|
5744
sys/contrib/dev/ath/public/sparc-be-elf.hal.o.uu
Normal file
5744
sys/contrib/dev/ath/public/sparc-be-elf.hal.o.uu
Normal file
File diff suppressed because it is too large
Load Diff
72
sys/contrib/dev/ath/public/sparc-be-elf.inc
Normal file
72
sys/contrib/dev/ath/public/sparc-be-elf.inc
Normal file
@ -0,0 +1,72 @@
|
||||
#
|
||||
# Copyright (c) 2002-2004 Sam Leffler, Errno Consulting
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer,
|
||||
# without modification.
|
||||
# 2. Redistributions in binary form must reproduce at minimum a disclaimer
|
||||
# similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any
|
||||
# redistribution must be conditioned upon including a substantially
|
||||
# similar Disclaimer requirement for further binary redistribution.
|
||||
# 3. Neither the names of the above-listed copyright holders nor the names
|
||||
# of any contributors may be used to endorse or promote products derived
|
||||
# from this software without specific prior written permission.
|
||||
#
|
||||
# Alternatively, this software may be distributed under the terms of the
|
||||
# GNU General Public License ("GPL") version 2 as published by the Free
|
||||
# Software Foundation.
|
||||
#
|
||||
# NO WARRANTY
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY
|
||||
# AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
# THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY,
|
||||
# OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
||||
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||
# THE POSSIBILITY OF SUCH DAMAGES.
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
#
|
||||
# Compilation configuration for building big-endian Sparc for 32-bit.
|
||||
#
|
||||
# Built with GNU cross-devel tools:
|
||||
#
|
||||
# PREFIX=/pub/gnu
|
||||
# BINUTILS=binutils-2.14
|
||||
# GCC=gcc-3.3.2
|
||||
# target=sparc-elf
|
||||
#
|
||||
# ${BINUTILS}/configure --target=$target --prefix=${PREFIX}
|
||||
# ${GCC}/configure --target=$target --prefix=${PREFIX} \
|
||||
# --enable-languages=c --with-gnu-as --with-gnu-ld \
|
||||
# --with-newlib --with-gxx-include-dir=${PREFIX}/$target/include
|
||||
#
|
||||
ifndef TOOLPREFIX
|
||||
TOOLPREFIX= /pub/gnu/bin/sparc-elf-
|
||||
endif
|
||||
#
|
||||
CC= ${TOOLPREFIX}gcc
|
||||
LD= ${TOOLPREFIX}ld
|
||||
STRIP= ${TOOLPREFIX}strip
|
||||
OBJCOPY=${TOOLPREFIX}objcopy
|
||||
NM= ${TOOLPREFIX}nm
|
||||
|
||||
#
|
||||
# Force register read/write operations to go through a function.
|
||||
#
|
||||
AH_REGOPS_FUNC=1
|
||||
|
||||
LDOPTS= -EB
|
||||
COPTS+= -DAH_BYTE_ORDER=AH_BIG_ENDIAN
|
||||
COPTS+= -m32
|
||||
COPTS+= -mno-fpu
|
8
sys/contrib/dev/ath/public/sparc-be-elf.opt_ah.h
Normal file
8
sys/contrib/dev/ath/public/sparc-be-elf.opt_ah.h
Normal file
@ -0,0 +1,8 @@
|
||||
#define AH_SUPPORT_AR5210 1
|
||||
#define AH_SUPPORT_AR5211 1
|
||||
#define AH_SUPPORT_AR5212 1
|
||||
#define AH_SUPPORT_5111 1
|
||||
#define AH_SUPPORT_5112 1
|
||||
#define AH_SUPPORT_2413 1
|
||||
#define AH_SUPPORT_5413 1
|
||||
#define AH_REGOPS_FUNC 1
|
4170
sys/dev/sk/if_sk.c
Normal file
4170
sys/dev/sk/if_sk.c
Normal file
File diff suppressed because it is too large
Load Diff
270
sys/geom/eli/g_eli_privacy.c
Normal file
270
sys/geom/eli/g_eli_privacy.c
Normal file
@ -0,0 +1,270 @@
|
||||
/*-
|
||||
* Copyright (c) 2005-2006 Pawel Jakub Dawidek <pjd@FreeBSD.org>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/linker.h>
|
||||
#include <sys/module.h>
|
||||
#include <sys/lock.h>
|
||||
#include <sys/mutex.h>
|
||||
#include <sys/bio.h>
|
||||
#include <sys/sysctl.h>
|
||||
#include <sys/malloc.h>
|
||||
#include <sys/kthread.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/sched.h>
|
||||
#include <sys/smp.h>
|
||||
#include <sys/uio.h>
|
||||
#include <sys/vnode.h>
|
||||
|
||||
#include <vm/uma.h>
|
||||
|
||||
#include <geom/geom.h>
|
||||
#include <geom/eli/g_eli.h>
|
||||
#include <geom/eli/pkcs5v2.h>
|
||||
|
||||
/*
|
||||
* Code paths:
|
||||
* BIO_READ:
|
||||
* g_eli_start -> g_io_request -> g_eli_read_done -> g_eli_crypto_run -> g_eli_crypto_read_done -> g_io_deliver
|
||||
* BIO_WRITE:
|
||||
* g_eli_start -> g_eli_crypto_run -> g_eli_crypto_write_done -> g_io_request -> g_eli_write_done -> g_io_deliver
|
||||
*/
|
||||
|
||||
MALLOC_DECLARE(M_ELI);
|
||||
|
||||
/*
|
||||
* The function is called after we read and decrypt data.
|
||||
*
|
||||
* g_eli_start -> g_io_request -> g_eli_read_done -> g_eli_crypto_run -> G_ELI_CRYPTO_READ_DONE -> g_io_deliver
|
||||
*/
|
||||
static int
|
||||
g_eli_crypto_read_done(struct cryptop *crp)
|
||||
{
|
||||
struct bio *bp;
|
||||
|
||||
if (crp->crp_etype == EAGAIN) {
|
||||
if (g_eli_crypto_rerun(crp) == 0)
|
||||
return (0);
|
||||
}
|
||||
bp = (struct bio *)crp->crp_opaque;
|
||||
bp->bio_inbed++;
|
||||
if (crp->crp_etype == 0) {
|
||||
G_ELI_DEBUG(3, "Crypto READ request done (%d/%d).",
|
||||
bp->bio_inbed, bp->bio_children);
|
||||
bp->bio_completed += crp->crp_olen;
|
||||
} else {
|
||||
G_ELI_DEBUG(1, "Crypto READ request failed (%d/%d) error=%d.",
|
||||
bp->bio_inbed, bp->bio_children, crp->crp_etype);
|
||||
if (bp->bio_error == 0)
|
||||
bp->bio_error = crp->crp_etype;
|
||||
}
|
||||
/*
|
||||
* Do we have all sectors already?
|
||||
*/
|
||||
if (bp->bio_inbed < bp->bio_children)
|
||||
return (0);
|
||||
free(bp->bio_driver2, M_ELI);
|
||||
bp->bio_driver2 = NULL;
|
||||
if (bp->bio_error != 0) {
|
||||
G_ELI_LOGREQ(0, bp, "Crypto READ request failed (error=%d).",
|
||||
bp->bio_error);
|
||||
bp->bio_completed = 0;
|
||||
}
|
||||
/*
|
||||
* Read is finished, send it up.
|
||||
*/
|
||||
g_io_deliver(bp, bp->bio_error);
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* The function is called after data encryption.
|
||||
*
|
||||
* g_eli_start -> g_eli_crypto_run -> G_ELI_CRYPTO_WRITE_DONE -> g_io_request -> g_eli_write_done -> g_io_deliver
|
||||
*/
|
||||
static int
|
||||
g_eli_crypto_write_done(struct cryptop *crp)
|
||||
{
|
||||
struct g_geom *gp;
|
||||
struct g_consumer *cp;
|
||||
struct bio *bp, *cbp;
|
||||
|
||||
if (crp->crp_etype == EAGAIN) {
|
||||
if (g_eli_crypto_rerun(crp) == 0)
|
||||
return (0);
|
||||
}
|
||||
bp = (struct bio *)crp->crp_opaque;
|
||||
bp->bio_inbed++;
|
||||
if (crp->crp_etype == 0) {
|
||||
G_ELI_DEBUG(3, "Crypto WRITE request done (%d/%d).",
|
||||
bp->bio_inbed, bp->bio_children);
|
||||
} else {
|
||||
G_ELI_DEBUG(1, "Crypto WRITE request failed (%d/%d) error=%d.",
|
||||
bp->bio_inbed, bp->bio_children, crp->crp_etype);
|
||||
if (bp->bio_error == 0)
|
||||
bp->bio_error = crp->crp_etype;
|
||||
}
|
||||
/*
|
||||
* All sectors are already encrypted?
|
||||
*/
|
||||
if (bp->bio_inbed < bp->bio_children)
|
||||
return (0);
|
||||
bp->bio_inbed = 0;
|
||||
bp->bio_children = 1;
|
||||
cbp = bp->bio_driver1;
|
||||
bp->bio_driver1 = NULL;
|
||||
if (bp->bio_error != 0) {
|
||||
G_ELI_LOGREQ(0, bp, "Crypto WRITE request failed (error=%d).",
|
||||
bp->bio_error);
|
||||
free(bp->bio_driver2, M_ELI);
|
||||
bp->bio_driver2 = NULL;
|
||||
g_destroy_bio(cbp);
|
||||
g_io_deliver(bp, bp->bio_error);
|
||||
return (0);
|
||||
}
|
||||
cbp->bio_data = bp->bio_driver2;
|
||||
cbp->bio_done = g_eli_write_done;
|
||||
gp = bp->bio_to->geom;
|
||||
cp = LIST_FIRST(&gp->consumer);
|
||||
cbp->bio_to = cp->provider;
|
||||
G_ELI_LOGREQ(2, cbp, "Sending request.");
|
||||
/*
|
||||
* Send encrypted data to the provider.
|
||||
*/
|
||||
g_io_request(cbp, cp);
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* This is the main function responsible for cryptography (ie. communication
|
||||
* with crypto(9) subsystem).
|
||||
*/
|
||||
void
|
||||
g_eli_crypto_run(struct g_eli_worker *wr, struct bio *bp)
|
||||
{
|
||||
struct g_eli_softc *sc;
|
||||
struct cryptop *crp;
|
||||
struct cryptodesc *crd;
|
||||
struct uio *uio;
|
||||
struct iovec *iov;
|
||||
u_int i, nsec, add, secsize;
|
||||
int err, error;
|
||||
size_t size;
|
||||
u_char *p, *data;
|
||||
|
||||
G_ELI_LOGREQ(3, bp, "%s", __func__);
|
||||
|
||||
bp->bio_pflags = wr->w_number;
|
||||
sc = wr->w_softc;
|
||||
secsize = LIST_FIRST(&sc->sc_geom->provider)->sectorsize;
|
||||
nsec = bp->bio_length / secsize;
|
||||
|
||||
/*
|
||||
* Calculate how much memory do we need.
|
||||
* We need separate crypto operation for every single sector.
|
||||
* It is much faster to calculate total amount of needed memory here and
|
||||
* do the allocation once instead of allocating memory in pieces (many,
|
||||
* many pieces).
|
||||
*/
|
||||
size = sizeof(*crp) * nsec;
|
||||
size += sizeof(*crd) * nsec;
|
||||
size += sizeof(*uio) * nsec;
|
||||
size += sizeof(*iov) * nsec;
|
||||
/*
|
||||
* If we write the data we cannot destroy current bio_data content,
|
||||
* so we need to allocate more memory for encrypted data.
|
||||
*/
|
||||
if (bp->bio_cmd == BIO_WRITE)
|
||||
size += bp->bio_length;
|
||||
p = malloc(size, M_ELI, M_WAITOK);
|
||||
|
||||
bp->bio_inbed = 0;
|
||||
bp->bio_children = nsec;
|
||||
bp->bio_driver2 = p;
|
||||
|
||||
if (bp->bio_cmd == BIO_READ)
|
||||
data = bp->bio_data;
|
||||
else {
|
||||
data = p;
|
||||
p += bp->bio_length;
|
||||
bcopy(bp->bio_data, data, bp->bio_length);
|
||||
}
|
||||
|
||||
error = 0;
|
||||
for (i = 0, add = 0; i < nsec; i++, add += secsize) {
|
||||
crp = (struct cryptop *)p; p += sizeof(*crp);
|
||||
crd = (struct cryptodesc *)p; p += sizeof(*crd);
|
||||
uio = (struct uio *)p; p += sizeof(*uio);
|
||||
iov = (struct iovec *)p; p += sizeof(*iov);
|
||||
|
||||
iov->iov_len = secsize;
|
||||
iov->iov_base = data;
|
||||
data += secsize;
|
||||
|
||||
uio->uio_iov = iov;
|
||||
uio->uio_iovcnt = 1;
|
||||
uio->uio_segflg = UIO_SYSSPACE;
|
||||
uio->uio_resid = secsize;
|
||||
|
||||
crp->crp_sid = wr->w_sid;
|
||||
crp->crp_ilen = secsize;
|
||||
crp->crp_olen = secsize;
|
||||
crp->crp_opaque = (void *)bp;
|
||||
crp->crp_buf = (void *)uio;
|
||||
if (bp->bio_cmd == BIO_WRITE)
|
||||
crp->crp_callback = g_eli_crypto_write_done;
|
||||
else /* if (bp->bio_cmd == BIO_READ) */
|
||||
crp->crp_callback = g_eli_crypto_read_done;
|
||||
crp->crp_flags = CRYPTO_F_IOV | CRYPTO_F_CBIFSYNC | CRYPTO_F_REL;
|
||||
if (g_eli_batch)
|
||||
crp->crp_flags |= CRYPTO_F_BATCH;
|
||||
crp->crp_desc = crd;
|
||||
|
||||
crd->crd_skip = 0;
|
||||
crd->crd_len = secsize;
|
||||
crd->crd_flags = CRD_F_IV_EXPLICIT | CRD_F_IV_PRESENT;
|
||||
if (bp->bio_cmd == BIO_WRITE)
|
||||
crd->crd_flags |= CRD_F_ENCRYPT;
|
||||
crd->crd_alg = sc->sc_ealgo;
|
||||
crd->crd_key = sc->sc_ekey;
|
||||
crd->crd_klen = sc->sc_ekeylen;
|
||||
g_eli_crypto_ivgen(sc, bp->bio_offset + add, crd->crd_iv,
|
||||
sizeof(crd->crd_iv));
|
||||
crd->crd_next = NULL;
|
||||
|
||||
crp->crp_etype = 0;
|
||||
err = crypto_dispatch(crp);
|
||||
if (error == 0)
|
||||
error = err;
|
||||
}
|
||||
if (bp->bio_error == 0)
|
||||
bp->bio_error = error;
|
||||
}
|
405
sys/i386/i386/minidump_machdep.c
Normal file
405
sys/i386/i386/minidump_machdep.c
Normal file
@ -0,0 +1,405 @@
|
||||
/*-
|
||||
* Copyright (c) 2006 Peter Wemm
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/conf.h>
|
||||
#include <sys/cons.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/kerneldump.h>
|
||||
#include <sys/msgbuf.h>
|
||||
#include <vm/vm.h>
|
||||
#include <vm/pmap.h>
|
||||
#include <machine/atomic.h>
|
||||
#include <machine/elf.h>
|
||||
#include <machine/md_var.h>
|
||||
#include <machine/vmparam.h>
|
||||
#include <machine/minidump.h>
|
||||
|
||||
CTASSERT(sizeof(struct kerneldumpheader) == 512);
|
||||
|
||||
/*
|
||||
* Don't touch the first SIZEOF_METADATA bytes on the dump device. This
|
||||
* is to protect us from metadata and to protect metadata from us.
|
||||
*/
|
||||
#define SIZEOF_METADATA (64*1024)
|
||||
|
||||
#define MD_ALIGN(x) (((off_t)(x) + PAGE_MASK) & ~PAGE_MASK)
|
||||
#define DEV_ALIGN(x) (((off_t)(x) + (DEV_BSIZE-1)) & ~(DEV_BSIZE-1))
|
||||
|
||||
uint32_t *vm_page_dump;
|
||||
int vm_page_dump_size;
|
||||
|
||||
static struct kerneldumpheader kdh;
|
||||
static off_t dumplo;
|
||||
|
||||
/* Handle chunked writes. */
|
||||
static size_t fragsz;
|
||||
static void *dump_va;
|
||||
static uint64_t counter, progress;
|
||||
|
||||
CTASSERT(sizeof(*vm_page_dump) == 4);
|
||||
|
||||
static int
|
||||
is_dumpable(vm_paddr_t pa)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; dump_avail[i] != 0 || dump_avail[i + 1] != 0; i += 2) {
|
||||
if (pa >= dump_avail[i] && pa < dump_avail[i + 1])
|
||||
return (1);
|
||||
}
|
||||
return (0);
|
||||
}
|
||||
|
||||
/* XXX should be MI */
|
||||
static void
|
||||
mkdumpheader(struct kerneldumpheader *kdh, uint32_t archver, uint64_t dumplen,
|
||||
uint32_t blksz)
|
||||
{
|
||||
|
||||
bzero(kdh, sizeof(*kdh));
|
||||
strncpy(kdh->magic, KERNELDUMPMAGIC, sizeof(kdh->magic));
|
||||
strncpy(kdh->architecture, MACHINE_ARCH, sizeof(kdh->architecture));
|
||||
kdh->version = htod32(KERNELDUMPVERSION);
|
||||
kdh->architectureversion = htod32(archver);
|
||||
kdh->dumplength = htod64(dumplen);
|
||||
kdh->dumptime = htod64(time_second);
|
||||
kdh->blocksize = htod32(blksz);
|
||||
strncpy(kdh->hostname, hostname, sizeof(kdh->hostname));
|
||||
strncpy(kdh->versionstring, version, sizeof(kdh->versionstring));
|
||||
if (panicstr != NULL)
|
||||
strncpy(kdh->panicstring, panicstr, sizeof(kdh->panicstring));
|
||||
kdh->parity = kerneldump_parity(kdh);
|
||||
}
|
||||
|
||||
#define PG2MB(pgs) (((pgs) + (1 << 8) - 1) >> 8)
|
||||
|
||||
static int
|
||||
blk_flush(struct dumperinfo *di)
|
||||
{
|
||||
int error;
|
||||
|
||||
if (fragsz == 0)
|
||||
return (0);
|
||||
|
||||
error = di->dumper(di->priv, dump_va, 0, dumplo, fragsz);
|
||||
dumplo += fragsz;
|
||||
fragsz = 0;
|
||||
return (error);
|
||||
}
|
||||
|
||||
static int
|
||||
blk_write(struct dumperinfo *di, char *ptr, vm_paddr_t pa, size_t sz)
|
||||
{
|
||||
size_t len;
|
||||
int error, i, c;
|
||||
|
||||
error = 0;
|
||||
if ((sz % PAGE_SIZE) != 0) {
|
||||
printf("size not page aligned\n");
|
||||
return (EINVAL);
|
||||
}
|
||||
if (ptr != NULL && pa != 0) {
|
||||
printf("cant have both va and pa!\n");
|
||||
return (EINVAL);
|
||||
}
|
||||
if (pa != 0 && (((uintptr_t)ptr) % PAGE_SIZE) != 0) {
|
||||
printf("address not page aligned\n");
|
||||
return (EINVAL);
|
||||
}
|
||||
if (ptr != NULL) {
|
||||
/* If we're doing a virtual dump, flush any pre-existing pa pages */
|
||||
error = blk_flush(di);
|
||||
if (error)
|
||||
return (error);
|
||||
}
|
||||
while (sz) {
|
||||
len = (MAXDUMPPGS * PAGE_SIZE) - fragsz;
|
||||
if (len > sz)
|
||||
len = sz;
|
||||
counter += len;
|
||||
progress -= len;
|
||||
if (counter >> 24) {
|
||||
printf(" %lld", PG2MB(progress >> PAGE_SHIFT));
|
||||
counter &= (1<<24) - 1;
|
||||
}
|
||||
if (ptr) {
|
||||
error = di->dumper(di->priv, ptr, 0, dumplo, len);
|
||||
if (error)
|
||||
return (error);
|
||||
dumplo += len;
|
||||
ptr += len;
|
||||
sz -= len;
|
||||
} else {
|
||||
for (i = 0; i < len; i += PAGE_SIZE)
|
||||
dump_va = pmap_kenter_temporary(pa + i, (i + fragsz) >> PAGE_SHIFT);
|
||||
fragsz += len;
|
||||
pa += len;
|
||||
sz -= len;
|
||||
if (fragsz == (MAXDUMPPGS * PAGE_SIZE)) {
|
||||
error = blk_flush(di);
|
||||
if (error)
|
||||
return (error);
|
||||
}
|
||||
}
|
||||
|
||||
/* Check for user abort. */
|
||||
c = cncheckc();
|
||||
if (c == 0x03)
|
||||
return (ECANCELED);
|
||||
if (c != -1)
|
||||
printf(" (CTRL-C to abort) ");
|
||||
}
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
/* A fake page table page, to avoid having to handle both 4K and 2M pages */
|
||||
static pt_entry_t fakept[NPTEPG];
|
||||
|
||||
void
|
||||
minidumpsys(struct dumperinfo *di)
|
||||
{
|
||||
uint64_t dumpsize;
|
||||
uint32_t ptesize;
|
||||
vm_offset_t va;
|
||||
int error;
|
||||
uint32_t bits;
|
||||
uint64_t pa;
|
||||
pd_entry_t *pd;
|
||||
pt_entry_t *pt;
|
||||
int i, j, k, bit;
|
||||
struct minidumphdr mdhdr;
|
||||
|
||||
counter = 0;
|
||||
/* Walk page table pages, set bits in vm_page_dump */
|
||||
ptesize = 0;
|
||||
for (va = KERNBASE; va < kernel_vm_end; va += NBPDR) {
|
||||
/*
|
||||
* We always write a page, even if it is zero. Each
|
||||
* page written corresponds to 2MB of space
|
||||
*/
|
||||
ptesize += PAGE_SIZE;
|
||||
pd = (pd_entry_t *)((uintptr_t)IdlePTD + KERNBASE); /* always mapped! */
|
||||
j = va >> PDRSHIFT;
|
||||
if ((pd[j] & (PG_PS | PG_V)) == (PG_PS | PG_V)) {
|
||||
/* This is an entire 2M page. */
|
||||
pa = pd[j] & PG_FRAME & ~PDRMASK;
|
||||
for (k = 0; k < NPTEPG; k++) {
|
||||
if (is_dumpable(pa))
|
||||
dump_add_page(pa);
|
||||
pa += PAGE_SIZE;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if ((pd[j] & PG_V) == PG_V) {
|
||||
/* set bit for each valid page in this 2MB block */
|
||||
pt = pmap_kenter_temporary(pd[j] & PG_FRAME, 0);
|
||||
for (k = 0; k < NPTEPG; k++) {
|
||||
if ((pt[k] & PG_V) == PG_V) {
|
||||
pa = pt[k] & PG_FRAME;
|
||||
if (is_dumpable(pa))
|
||||
dump_add_page(pa);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
/* nothing, we're going to dump a null page */
|
||||
}
|
||||
}
|
||||
|
||||
/* Calculate dump size. */
|
||||
dumpsize = ptesize;
|
||||
dumpsize += round_page(msgbufp->msg_size);
|
||||
dumpsize += round_page(vm_page_dump_size);
|
||||
for (i = 0; i < vm_page_dump_size / sizeof(*vm_page_dump); i++) {
|
||||
bits = vm_page_dump[i];
|
||||
while (bits) {
|
||||
bit = bsfl(bits);
|
||||
pa = (((uint64_t)i * sizeof(*vm_page_dump) * NBBY) + bit) * PAGE_SIZE;
|
||||
/* Clear out undumpable pages now if needed */
|
||||
if (is_dumpable(pa)) {
|
||||
dumpsize += PAGE_SIZE;
|
||||
} else {
|
||||
dump_drop_page(pa);
|
||||
}
|
||||
bits &= ~(1ul << bit);
|
||||
}
|
||||
}
|
||||
dumpsize += PAGE_SIZE;
|
||||
|
||||
/* Determine dump offset on device. */
|
||||
if (di->mediasize < SIZEOF_METADATA + dumpsize + sizeof(kdh) * 2) {
|
||||
error = ENOSPC;
|
||||
goto fail;
|
||||
}
|
||||
dumplo = di->mediaoffset + di->mediasize - dumpsize;
|
||||
dumplo -= sizeof(kdh) * 2;
|
||||
progress = dumpsize;
|
||||
|
||||
/* Initialize mdhdr */
|
||||
bzero(&mdhdr, sizeof(mdhdr));
|
||||
strcpy(mdhdr.magic, MINIDUMP_MAGIC);
|
||||
mdhdr.version = MINIDUMP_VERSION;
|
||||
mdhdr.msgbufsize = msgbufp->msg_size;
|
||||
mdhdr.bitmapsize = vm_page_dump_size;
|
||||
mdhdr.ptesize = ptesize;
|
||||
mdhdr.kernbase = KERNBASE;
|
||||
#ifdef PAE
|
||||
mdhdr.paemode = 1;
|
||||
#endif
|
||||
|
||||
mkdumpheader(&kdh, KERNELDUMP_I386_VERSION, dumpsize, di->blocksize);
|
||||
|
||||
printf("Physical memory: %ju MB\n", ptoa((uintmax_t)physmem) / 1048576);
|
||||
printf("Dumping %llu MB:", (long long)dumpsize >> 20);
|
||||
|
||||
/* Dump leader */
|
||||
error = di->dumper(di->priv, &kdh, 0, dumplo, sizeof(kdh));
|
||||
if (error)
|
||||
goto fail;
|
||||
dumplo += sizeof(kdh);
|
||||
|
||||
/* Dump my header */
|
||||
bzero(&fakept, sizeof(fakept));
|
||||
bcopy(&mdhdr, &fakept, sizeof(mdhdr));
|
||||
error = blk_write(di, (char *)&fakept, 0, PAGE_SIZE);
|
||||
if (error)
|
||||
goto fail;
|
||||
|
||||
/* Dump msgbuf up front */
|
||||
error = blk_write(di, (char *)msgbufp->msg_ptr, 0, round_page(msgbufp->msg_size));
|
||||
if (error)
|
||||
goto fail;
|
||||
|
||||
/* Dump bitmap */
|
||||
error = blk_write(di, (char *)vm_page_dump, 0, round_page(vm_page_dump_size));
|
||||
if (error)
|
||||
goto fail;
|
||||
|
||||
/* Dump kernel page table pages */
|
||||
for (va = KERNBASE; va < kernel_vm_end; va += NBPDR) {
|
||||
/* We always write a page, even if it is zero */
|
||||
pd = (pd_entry_t *)((uintptr_t)IdlePTD + KERNBASE); /* always mapped! */
|
||||
j = va >> PDRSHIFT;
|
||||
if ((pd[j] & (PG_PS | PG_V)) == (PG_PS | PG_V)) {
|
||||
/* This is a single 2M block. Generate a fake PTP */
|
||||
pa = pd[j] & PG_FRAME & ~PDRMASK;
|
||||
for (k = 0; k < NPTEPG; k++) {
|
||||
fakept[k] = (pa + (k * PAGE_SIZE)) | PG_V | PG_RW | PG_A | PG_M;
|
||||
}
|
||||
error = blk_write(di, (char *)&fakept, 0, PAGE_SIZE);
|
||||
if (error)
|
||||
goto fail;
|
||||
/* flush, in case we reuse fakept in the same block */
|
||||
error = blk_flush(di);
|
||||
if (error)
|
||||
goto fail;
|
||||
continue;
|
||||
}
|
||||
if ((pd[j] & PG_V) == PG_V) {
|
||||
pa = pd[j] & PG_FRAME;
|
||||
error = blk_write(di, 0, pa, PAGE_SIZE);
|
||||
if (error)
|
||||
goto fail;
|
||||
} else {
|
||||
bzero(fakept, sizeof(fakept));
|
||||
error = blk_write(di, (char *)&fakept, 0, PAGE_SIZE);
|
||||
if (error)
|
||||
goto fail;
|
||||
/* flush, in case we reuse fakept in the same block */
|
||||
error = blk_flush(di);
|
||||
if (error)
|
||||
goto fail;
|
||||
}
|
||||
}
|
||||
|
||||
/* Dump memory chunks */
|
||||
/* XXX cluster it up and use blk_dump() */
|
||||
for (i = 0; i < vm_page_dump_size / sizeof(*vm_page_dump); i++) {
|
||||
bits = vm_page_dump[i];
|
||||
while (bits) {
|
||||
bit = bsfl(bits);
|
||||
pa = (((uint64_t)i * sizeof(*vm_page_dump) * NBBY) + bit) * PAGE_SIZE;
|
||||
error = blk_write(di, 0, pa, PAGE_SIZE);
|
||||
if (error)
|
||||
goto fail;
|
||||
bits &= ~(1ul << bit);
|
||||
}
|
||||
}
|
||||
|
||||
error = blk_flush(di);
|
||||
if (error)
|
||||
goto fail;
|
||||
|
||||
/* Dump trailer */
|
||||
error = di->dumper(di->priv, &kdh, 0, dumplo, sizeof(kdh));
|
||||
if (error)
|
||||
goto fail;
|
||||
dumplo += sizeof(kdh);
|
||||
|
||||
/* Signal completion, signoff and exit stage left. */
|
||||
di->dumper(di->priv, NULL, 0, 0, 0);
|
||||
printf("\nDump complete\n");
|
||||
return;
|
||||
|
||||
fail:
|
||||
if (error < 0)
|
||||
error = -error;
|
||||
|
||||
if (error == ECANCELED)
|
||||
printf("\nDump aborted\n");
|
||||
else if (error == ENOSPC)
|
||||
printf("\nDump failed. Partition too small.\n");
|
||||
else
|
||||
printf("\n** DUMP FAILED (ERROR %d) **\n", error);
|
||||
}
|
||||
|
||||
void
|
||||
dump_add_page(vm_paddr_t pa)
|
||||
{
|
||||
int idx, bit;
|
||||
|
||||
pa >>= PAGE_SHIFT;
|
||||
idx = pa >> 5; /* 2^5 = 32 */
|
||||
bit = pa & 31;
|
||||
atomic_set_int(&vm_page_dump[idx], 1ul << bit);
|
||||
}
|
||||
|
||||
void
|
||||
dump_drop_page(vm_paddr_t pa)
|
||||
{
|
||||
int idx, bit;
|
||||
|
||||
pa >>= PAGE_SHIFT;
|
||||
idx = pa >> 5; /* 2^5 = 32 */
|
||||
bit = pa & 31;
|
||||
atomic_clear_int(&vm_page_dump[idx], 1ul << bit);
|
||||
}
|
||||
|
545
sys/security/audit/audit_bsm_klib.c
Normal file
545
sys/security/audit/audit_bsm_klib.c
Normal file
@ -0,0 +1,545 @@
|
||||
/*
|
||||
* Copyright (c) 1999-2005 Apple Computer, Inc.
|
||||
* Copyright (c) 2005 Robert N. M. Watson
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
|
||||
* its contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/fcntl.h>
|
||||
#include <sys/filedesc.h>
|
||||
#include <sys/libkern.h>
|
||||
#include <sys/malloc.h>
|
||||
#include <sys/mount.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/sem.h>
|
||||
#include <sys/syscall.h>
|
||||
#include <sys/sysctl.h>
|
||||
#include <sys/sysent.h>
|
||||
#include <sys/vnode.h>
|
||||
|
||||
#include <bsm/audit.h>
|
||||
#include <bsm/audit_kevents.h>
|
||||
#include <security/audit/audit.h>
|
||||
#include <security/audit/audit_private.h>
|
||||
|
||||
/*
|
||||
* Hash table functions for the audit event number to event class mask
|
||||
* mapping.
|
||||
*/
|
||||
#define EVCLASSMAP_HASH_TABLE_SIZE 251
|
||||
struct evclass_elem {
|
||||
au_event_t event;
|
||||
au_class_t class;
|
||||
LIST_ENTRY(evclass_elem) entry;
|
||||
};
|
||||
struct evclass_list {
|
||||
LIST_HEAD(, evclass_elem) head;
|
||||
};
|
||||
|
||||
static MALLOC_DEFINE(M_AUDITEVCLASS, "audit_evclass", "Audit event class");
|
||||
static struct mtx evclass_mtx;
|
||||
static struct evclass_list evclass_hash[EVCLASSMAP_HASH_TABLE_SIZE];
|
||||
|
||||
/*
|
||||
* Look up the class for an audit event in the class mapping table.
|
||||
*/
|
||||
au_class_t
|
||||
au_event_class(au_event_t event)
|
||||
{
|
||||
struct evclass_list *evcl;
|
||||
struct evclass_elem *evc;
|
||||
au_class_t class;
|
||||
|
||||
mtx_lock(&evclass_mtx);
|
||||
evcl = &evclass_hash[event % EVCLASSMAP_HASH_TABLE_SIZE];
|
||||
class = AU_NULL;
|
||||
LIST_FOREACH(evc, &evcl->head, entry) {
|
||||
if (evc->event == event) {
|
||||
class = evc->class;
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
out:
|
||||
mtx_unlock(&evclass_mtx);
|
||||
return (class);
|
||||
}
|
||||
|
||||
/*
|
||||
* Insert a event to class mapping. If the event already exists in the
|
||||
* mapping, then replace the mapping with the new one.
|
||||
*
|
||||
* XXX There is currently no constraints placed on the number of mappings.
|
||||
* May want to either limit to a number, or in terms of memory usage.
|
||||
*/
|
||||
void
|
||||
au_evclassmap_insert(au_event_t event, au_class_t class)
|
||||
{
|
||||
struct evclass_list *evcl;
|
||||
struct evclass_elem *evc, *evc_new;
|
||||
|
||||
/*
|
||||
* Pessimistically, always allocate storage before acquiring mutex.
|
||||
* Free if there is already a mapping for this event.
|
||||
*/
|
||||
evc_new = malloc(sizeof(*evc), M_AUDITEVCLASS, M_WAITOK);
|
||||
|
||||
mtx_lock(&evclass_mtx);
|
||||
evcl = &evclass_hash[event % EVCLASSMAP_HASH_TABLE_SIZE];
|
||||
LIST_FOREACH(evc, &evcl->head, entry) {
|
||||
if (evc->event == event) {
|
||||
evc->class = class;
|
||||
mtx_unlock(&evclass_mtx);
|
||||
free(evc_new, M_AUDITEVCLASS);
|
||||
return;
|
||||
}
|
||||
}
|
||||
evc = evc_new;
|
||||
evc->event = event;
|
||||
evc->class = class;
|
||||
LIST_INSERT_HEAD(&evcl->head, evc, entry);
|
||||
mtx_unlock(&evclass_mtx);
|
||||
}
|
||||
|
||||
void
|
||||
au_evclassmap_init(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
mtx_init(&evclass_mtx, "evclass_mtx", NULL, MTX_DEF);
|
||||
for (i = 0; i < EVCLASSMAP_HASH_TABLE_SIZE; i++)
|
||||
LIST_INIT(&evclass_hash[i].head);
|
||||
|
||||
/*
|
||||
* Set up the initial event to class mapping for system calls.
|
||||
*
|
||||
* XXXRW: Really, this should walk all possible audit events, not all
|
||||
* native ABI system calls, as there may be audit events reachable
|
||||
* only through non-native system calls. It also seems a shame to
|
||||
* frob the mutex this early.
|
||||
*/
|
||||
for (i = 0; i < SYS_MAXSYSCALL; i++) {
|
||||
if (sysent[i].sy_auevent != AUE_NULL)
|
||||
au_evclassmap_insert(sysent[i].sy_auevent, AU_NULL);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Check whether an event is aditable by comparing the mask of classes this
|
||||
* event is part of against the given mask.
|
||||
*/
|
||||
int
|
||||
au_preselect(au_event_t event, au_class_t class, au_mask_t *mask_p, int sorf)
|
||||
{
|
||||
au_class_t effmask = 0;
|
||||
|
||||
if (mask_p == NULL)
|
||||
return (-1);
|
||||
|
||||
/*
|
||||
* Perform the actual check of the masks against the event.
|
||||
*/
|
||||
if (sorf & AU_PRS_SUCCESS)
|
||||
effmask |= (mask_p->am_success & class);
|
||||
|
||||
if (sorf & AU_PRS_FAILURE)
|
||||
effmask |= (mask_p->am_failure & class);
|
||||
|
||||
if (effmask)
|
||||
return (1);
|
||||
else
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* Convert sysctl names and present arguments to events.
|
||||
*/
|
||||
au_event_t
|
||||
ctlname_to_sysctlevent(int name[], uint64_t valid_arg)
|
||||
{
|
||||
|
||||
/* can't parse it - so return the worst case */
|
||||
if ((valid_arg & (ARG_CTLNAME | ARG_LEN)) != (ARG_CTLNAME | ARG_LEN))
|
||||
return (AUE_SYSCTL);
|
||||
|
||||
switch (name[0]) {
|
||||
/* non-admin "lookups" treat them special */
|
||||
case KERN_OSTYPE:
|
||||
case KERN_OSRELEASE:
|
||||
case KERN_OSREV:
|
||||
case KERN_VERSION:
|
||||
case KERN_ARGMAX:
|
||||
case KERN_CLOCKRATE:
|
||||
case KERN_BOOTTIME:
|
||||
case KERN_POSIX1:
|
||||
case KERN_NGROUPS:
|
||||
case KERN_JOB_CONTROL:
|
||||
case KERN_SAVED_IDS:
|
||||
case KERN_OSRELDATE:
|
||||
case KERN_DUMMY:
|
||||
return (AUE_SYSCTL_NONADMIN);
|
||||
|
||||
/* only treat the changeable controls as admin */
|
||||
case KERN_MAXVNODES:
|
||||
case KERN_MAXPROC:
|
||||
case KERN_MAXFILES:
|
||||
case KERN_MAXPROCPERUID:
|
||||
case KERN_MAXFILESPERPROC:
|
||||
case KERN_HOSTID:
|
||||
case KERN_SECURELVL:
|
||||
case KERN_HOSTNAME:
|
||||
case KERN_VNODE:
|
||||
case KERN_PROC:
|
||||
case KERN_FILE:
|
||||
case KERN_PROF:
|
||||
case KERN_NISDOMAINNAME:
|
||||
case KERN_UPDATEINTERVAL:
|
||||
case KERN_NTP_PLL:
|
||||
case KERN_BOOTFILE:
|
||||
case KERN_DUMPDEV:
|
||||
case KERN_IPC:
|
||||
case KERN_PS_STRINGS:
|
||||
case KERN_USRSTACK:
|
||||
case KERN_LOGSIGEXIT:
|
||||
case KERN_IOV_MAX:
|
||||
case KERN_MAXID:
|
||||
return ((valid_arg & ARG_VALUE) ?
|
||||
AUE_SYSCTL : AUE_SYSCTL_NONADMIN);
|
||||
|
||||
default:
|
||||
return (AUE_SYSCTL);
|
||||
}
|
||||
/* NOTREACHED */
|
||||
}
|
||||
|
||||
/*
|
||||
* Convert an open flags specifier into a specific type of open event for
|
||||
* auditing purposes.
|
||||
*/
|
||||
au_event_t
|
||||
flags_and_error_to_openevent(int oflags, int error)
|
||||
{
|
||||
au_event_t aevent;
|
||||
|
||||
/*
|
||||
* Need to check only those flags we care about.
|
||||
*/
|
||||
oflags = oflags & (O_RDONLY | O_CREAT | O_TRUNC | O_RDWR | O_WRONLY);
|
||||
|
||||
/*
|
||||
* These checks determine what flags are on with the condition that
|
||||
* ONLY that combination is on, and no other flags are on.
|
||||
*/
|
||||
switch (oflags) {
|
||||
case O_RDONLY:
|
||||
aevent = AUE_OPEN_R;
|
||||
break;
|
||||
|
||||
case (O_RDONLY | O_CREAT):
|
||||
aevent = AUE_OPEN_RC;
|
||||
break;
|
||||
|
||||
case (O_RDONLY | O_CREAT | O_TRUNC):
|
||||
aevent = AUE_OPEN_RTC;
|
||||
break;
|
||||
|
||||
case (O_RDONLY | O_TRUNC):
|
||||
aevent = AUE_OPEN_RT;
|
||||
break;
|
||||
|
||||
case O_RDWR:
|
||||
aevent = AUE_OPEN_RW;
|
||||
break;
|
||||
|
||||
case (O_RDWR | O_CREAT):
|
||||
aevent = AUE_OPEN_RWC;
|
||||
break;
|
||||
|
||||
case (O_RDWR | O_CREAT | O_TRUNC):
|
||||
aevent = AUE_OPEN_RWTC;
|
||||
break;
|
||||
|
||||
case (O_RDWR | O_TRUNC):
|
||||
aevent = AUE_OPEN_RWT;
|
||||
break;
|
||||
|
||||
case O_WRONLY:
|
||||
aevent = AUE_OPEN_W;
|
||||
break;
|
||||
|
||||
case (O_WRONLY | O_CREAT):
|
||||
aevent = AUE_OPEN_WC;
|
||||
break;
|
||||
|
||||
case (O_WRONLY | O_CREAT | O_TRUNC):
|
||||
aevent = AUE_OPEN_WTC;
|
||||
break;
|
||||
|
||||
case (O_WRONLY | O_TRUNC):
|
||||
aevent = AUE_OPEN_WT;
|
||||
break;
|
||||
|
||||
default:
|
||||
aevent = AUE_OPEN;
|
||||
break;
|
||||
}
|
||||
|
||||
#if 0
|
||||
/*
|
||||
* Convert chatty errors to better matching events.
|
||||
* Failures to find a file are really just attribute
|
||||
* events - so recast them as such.
|
||||
*
|
||||
* XXXAUDIT: Solaris defines that AUE_OPEN will never be returned, it
|
||||
* is just a placeholder. However, in Darwin we return that in
|
||||
* preference to other events. For now, comment this out as we don't
|
||||
* have a BSM conversion routine for AUE_OPEN.
|
||||
*/
|
||||
switch (aevent) {
|
||||
case AUE_OPEN_R:
|
||||
case AUE_OPEN_RT:
|
||||
case AUE_OPEN_RW:
|
||||
case AUE_OPEN_RWT:
|
||||
case AUE_OPEN_W:
|
||||
case AUE_OPEN_WT:
|
||||
if (error == ENOENT)
|
||||
aevent = AUE_OPEN;
|
||||
}
|
||||
#endif
|
||||
return (aevent);
|
||||
}
|
||||
|
||||
/*
|
||||
* Convert a MSGCTL command to a specific event.
|
||||
*/
|
||||
int
|
||||
msgctl_to_event(int cmd)
|
||||
{
|
||||
|
||||
switch (cmd) {
|
||||
case IPC_RMID:
|
||||
return (AUE_MSGCTL_RMID);
|
||||
|
||||
case IPC_SET:
|
||||
return (AUE_MSGCTL_SET);
|
||||
|
||||
case IPC_STAT:
|
||||
return (AUE_MSGCTL_STAT);
|
||||
|
||||
default:
|
||||
/* We will audit a bad command */
|
||||
return (AUE_MSGCTL);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Convert a SEMCTL command to a specific event.
|
||||
*/
|
||||
int
|
||||
semctl_to_event(int cmd)
|
||||
{
|
||||
|
||||
switch (cmd) {
|
||||
case GETALL:
|
||||
return (AUE_SEMCTL_GETALL);
|
||||
|
||||
case GETNCNT:
|
||||
return (AUE_SEMCTL_GETNCNT);
|
||||
|
||||
case GETPID:
|
||||
return (AUE_SEMCTL_GETPID);
|
||||
|
||||
case GETVAL:
|
||||
return (AUE_SEMCTL_GETVAL);
|
||||
|
||||
case GETZCNT:
|
||||
return (AUE_SEMCTL_GETZCNT);
|
||||
|
||||
case IPC_RMID:
|
||||
return (AUE_SEMCTL_RMID);
|
||||
|
||||
case IPC_SET:
|
||||
return (AUE_SEMCTL_SET);
|
||||
|
||||
case SETALL:
|
||||
return (AUE_SEMCTL_SETALL);
|
||||
|
||||
case SETVAL:
|
||||
return (AUE_SEMCTL_SETVAL);
|
||||
|
||||
case IPC_STAT:
|
||||
return (AUE_SEMCTL_STAT);
|
||||
|
||||
default:
|
||||
/* We will audit a bad command */
|
||||
return (AUE_SEMCTL);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Convert a command for the auditon() system call to a audit event.
|
||||
*/
|
||||
int
|
||||
auditon_command_event(int cmd)
|
||||
{
|
||||
|
||||
switch(cmd) {
|
||||
case A_GETPOLICY:
|
||||
return (AUE_AUDITON_GPOLICY);
|
||||
|
||||
case A_SETPOLICY:
|
||||
return (AUE_AUDITON_SPOLICY);
|
||||
|
||||
case A_GETKMASK:
|
||||
return (AUE_AUDITON_GETKMASK);
|
||||
|
||||
case A_SETKMASK:
|
||||
return (AUE_AUDITON_SETKMASK);
|
||||
|
||||
case A_GETQCTRL:
|
||||
return (AUE_AUDITON_GQCTRL);
|
||||
|
||||
case A_SETQCTRL:
|
||||
return (AUE_AUDITON_SQCTRL);
|
||||
|
||||
case A_GETCWD:
|
||||
return (AUE_AUDITON_GETCWD);
|
||||
|
||||
case A_GETCAR:
|
||||
return (AUE_AUDITON_GETCAR);
|
||||
|
||||
case A_GETSTAT:
|
||||
return (AUE_AUDITON_GETSTAT);
|
||||
|
||||
case A_SETSTAT:
|
||||
return (AUE_AUDITON_SETSTAT);
|
||||
|
||||
case A_SETUMASK:
|
||||
return (AUE_AUDITON_SETUMASK);
|
||||
|
||||
case A_SETSMASK:
|
||||
return (AUE_AUDITON_SETSMASK);
|
||||
|
||||
case A_GETCOND:
|
||||
return (AUE_AUDITON_GETCOND);
|
||||
|
||||
case A_SETCOND:
|
||||
return (AUE_AUDITON_SETCOND);
|
||||
|
||||
case A_GETCLASS:
|
||||
return (AUE_AUDITON_GETCLASS);
|
||||
|
||||
case A_SETCLASS:
|
||||
return (AUE_AUDITON_SETCLASS);
|
||||
|
||||
case A_GETPINFO:
|
||||
case A_SETPMASK:
|
||||
case A_SETFSIZE:
|
||||
case A_GETFSIZE:
|
||||
case A_GETPINFO_ADDR:
|
||||
case A_GETKAUDIT:
|
||||
case A_SETKAUDIT:
|
||||
default:
|
||||
return (AUE_AUDITON); /* No special record */
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Create a canonical path from given path by prefixing either the root
|
||||
* directory, or the current working directory. If the process working
|
||||
* directory is NULL, we could use 'rootvnode' to obtain the root directoty,
|
||||
* but this results in a volfs name written to the audit log. So we will
|
||||
* leave the filename starting with '/' in the audit log in this case.
|
||||
*
|
||||
* XXXRW: Since we combine two paths here, ideally a buffer of size
|
||||
* MAXPATHLEN * 2 would be passed in.
|
||||
*/
|
||||
void
|
||||
canon_path(struct thread *td, char *path, char *cpath)
|
||||
{
|
||||
char *bufp;
|
||||
char *retbuf, *freebuf;
|
||||
struct vnode *vnp;
|
||||
struct filedesc *fdp;
|
||||
int cisr, error, vfslocked;
|
||||
|
||||
fdp = td->td_proc->p_fd;
|
||||
bufp = path;
|
||||
cisr = 0;
|
||||
FILEDESC_LOCK(fdp);
|
||||
if (*(path) == '/') {
|
||||
while (*(bufp) == '/')
|
||||
bufp++; /* Skip leading '/'s. */
|
||||
/*
|
||||
* If no process root, or it is the same as the system root,
|
||||
* audit the path as passed in with a single '/'.
|
||||
*/
|
||||
if ((fdp->fd_rdir == NULL) ||
|
||||
(fdp->fd_rdir == rootvnode)) {
|
||||
vnp = NULL;
|
||||
bufp--; /* Restore one '/'. */
|
||||
} else {
|
||||
vnp = fdp->fd_rdir; /* Use process root. */
|
||||
vref(vnp);
|
||||
}
|
||||
} else {
|
||||
vnp = fdp->fd_cdir; /* Prepend the current dir. */
|
||||
cisr = (fdp->fd_rdir == fdp->fd_cdir);
|
||||
vref(vnp);
|
||||
bufp = path;
|
||||
}
|
||||
FILEDESC_UNLOCK(fdp);
|
||||
if (vnp != NULL) {
|
||||
/*
|
||||
* XXX: vn_fullpath() on FreeBSD is "less reliable" than
|
||||
* vn_getpath() on Darwin, so this will need more attention
|
||||
* in the future. Also, the question and string bounding
|
||||
* here seems a bit questionable and will also require
|
||||
* attention.
|
||||
*/
|
||||
vfslocked = VFS_LOCK_GIANT(vnp->v_mount);
|
||||
vn_lock(vnp, LK_EXCLUSIVE | LK_RETRY, td);
|
||||
error = vn_fullpath(td, vnp, &retbuf, &freebuf);
|
||||
if (error == 0) {
|
||||
/* Copy and free buffer allocated by vn_fullpath().
|
||||
* If the current working directory was the same as
|
||||
* the root directory, and the path was a relative
|
||||
* pathname, do not separate the two components with
|
||||
* the '/' character.
|
||||
*/
|
||||
snprintf(cpath, MAXPATHLEN, "%s%s%s", retbuf,
|
||||
cisr ? "" : "/", bufp);
|
||||
free(freebuf, M_TEMP);
|
||||
} else
|
||||
cpath[0] = '\0';
|
||||
vput(vnp);
|
||||
VFS_UNLOCK_GIANT(vfslocked);
|
||||
} else {
|
||||
strlcpy(cpath, bufp, MAXPATHLEN);
|
||||
}
|
||||
}
|
173
sys/security/audit/audit_trigger.c
Normal file
173
sys/security/audit/audit_trigger.c
Normal file
@ -0,0 +1,173 @@
|
||||
/*-
|
||||
* Copyright (c) 2005 Wayne J. Salamon
|
||||
* All rights reserved.
|
||||
*
|
||||
* This software was developed by Wayne Salamon for the TrustedBSD Project.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/conf.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/malloc.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/queue.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/uio.h>
|
||||
|
||||
#include <security/audit/audit.h>
|
||||
#include <security/audit/audit_private.h>
|
||||
|
||||
/*
|
||||
* Structures and operations to support the basic character special device
|
||||
* used to communicate with userland.
|
||||
*/
|
||||
struct trigger_info {
|
||||
unsigned int trigger;
|
||||
TAILQ_ENTRY(trigger_info) list;
|
||||
};
|
||||
static MALLOC_DEFINE(M_AUDITTRIGGER, "audit_trigger", "Audit trigger events");
|
||||
static struct cdev *audit_dev;
|
||||
static int audit_isopen = 0;
|
||||
static TAILQ_HEAD(, trigger_info) trigger_list;
|
||||
static struct mtx audit_trigger_mtx;
|
||||
|
||||
static int
|
||||
audit_open(struct cdev *dev, int oflags, int devtype, struct thread *td)
|
||||
{
|
||||
int error;
|
||||
|
||||
/* Only one process may open the device at a time. */
|
||||
mtx_lock(&audit_trigger_mtx);
|
||||
if (!audit_isopen) {
|
||||
error = 0;
|
||||
audit_isopen = 1;
|
||||
} else
|
||||
error = EBUSY;
|
||||
mtx_unlock(&audit_trigger_mtx);
|
||||
|
||||
return (error);
|
||||
}
|
||||
|
||||
static int
|
||||
audit_close(struct cdev *dev, int fflag, int devtype, struct thread *td)
|
||||
{
|
||||
struct trigger_info *ti;
|
||||
|
||||
/* Flush the queue of pending trigger events. */
|
||||
mtx_lock(&audit_trigger_mtx);
|
||||
audit_isopen = 0;
|
||||
while (!TAILQ_EMPTY(&trigger_list)) {
|
||||
ti = TAILQ_FIRST(&trigger_list);
|
||||
TAILQ_REMOVE(&trigger_list, ti, list);
|
||||
free(ti, M_AUDITTRIGGER);
|
||||
}
|
||||
mtx_unlock(&audit_trigger_mtx);
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
static int
|
||||
audit_read(struct cdev *dev, struct uio *uio, int ioflag)
|
||||
{
|
||||
int error = 0;
|
||||
struct trigger_info *ti = NULL;
|
||||
|
||||
mtx_lock(&audit_trigger_mtx);
|
||||
while (TAILQ_EMPTY(&trigger_list)) {
|
||||
error = msleep(&trigger_list, &audit_trigger_mtx,
|
||||
PSOCK | PCATCH, "auditd", 0);
|
||||
if (error)
|
||||
break;
|
||||
}
|
||||
if (!error) {
|
||||
ti = TAILQ_FIRST(&trigger_list);
|
||||
TAILQ_REMOVE(&trigger_list, ti, list);
|
||||
}
|
||||
mtx_unlock(&audit_trigger_mtx);
|
||||
if (!error) {
|
||||
error = uiomove(ti, sizeof *ti, uio);
|
||||
free(ti, M_AUDITTRIGGER);
|
||||
}
|
||||
return (error);
|
||||
}
|
||||
|
||||
static int
|
||||
audit_write(struct cdev *dev, struct uio *uio, int ioflag)
|
||||
{
|
||||
|
||||
/* Communication is kernel->userspace only. */
|
||||
return (EOPNOTSUPP);
|
||||
}
|
||||
|
||||
int
|
||||
send_trigger(unsigned int trigger)
|
||||
{
|
||||
struct trigger_info *ti;
|
||||
|
||||
/* If nobody's listening, we ain't talking. */
|
||||
if (!audit_isopen)
|
||||
return (ENODEV);
|
||||
|
||||
/*
|
||||
* XXXAUDIT: Use a condition variable instead of msleep/wakeup?
|
||||
*/
|
||||
ti = malloc(sizeof *ti, M_AUDITTRIGGER, M_WAITOK);
|
||||
mtx_lock(&audit_trigger_mtx);
|
||||
ti->trigger = trigger;
|
||||
TAILQ_INSERT_TAIL(&trigger_list, ti, list);
|
||||
wakeup(&trigger_list);
|
||||
mtx_unlock(&audit_trigger_mtx);
|
||||
return (0);
|
||||
}
|
||||
|
||||
static struct cdevsw audit_cdevsw = {
|
||||
.d_version = D_VERSION,
|
||||
.d_open = audit_open,
|
||||
.d_close = audit_close,
|
||||
.d_read = audit_read,
|
||||
.d_write = audit_write,
|
||||
.d_name = "audit"
|
||||
};
|
||||
|
||||
void
|
||||
audit_trigger_init(void)
|
||||
{
|
||||
|
||||
TAILQ_INIT(&trigger_list);
|
||||
mtx_init(&audit_trigger_mtx, "audit_trigger_mtx", NULL, MTX_DEF);
|
||||
}
|
||||
|
||||
static void
|
||||
audit_trigger_cdev_init(void *unused)
|
||||
{
|
||||
|
||||
/* Create the special device file. */
|
||||
audit_dev = make_dev(&audit_cdevsw, 0, UID_ROOT, GID_KMEM, 0600,
|
||||
AUDITDEV_FILENAME);
|
||||
}
|
||||
|
||||
SYSINIT(audit_trigger_cdev_init, SI_SUB_DRIVERS, SI_ORDER_MIDDLE,
|
||||
audit_trigger_cdev_init, NULL);
|
531
sys/security/audit/audit_worker.c
Normal file
531
sys/security/audit/audit_worker.c
Normal file
@ -0,0 +1,531 @@
|
||||
/*
|
||||
* Copyright (c) 1999-2005 Apple Computer, Inc.
|
||||
* Copyright (c) 2006 Robert N. M. Watson
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
|
||||
* its contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/condvar.h>
|
||||
#include <sys/conf.h>
|
||||
#include <sys/file.h>
|
||||
#include <sys/filedesc.h>
|
||||
#include <sys/fcntl.h>
|
||||
#include <sys/ipc.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/kthread.h>
|
||||
#include <sys/malloc.h>
|
||||
#include <sys/mount.h>
|
||||
#include <sys/namei.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/queue.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/socketvar.h>
|
||||
#include <sys/protosw.h>
|
||||
#include <sys/domain.h>
|
||||
#include <sys/sysproto.h>
|
||||
#include <sys/sysent.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/ucred.h>
|
||||
#include <sys/uio.h>
|
||||
#include <sys/un.h>
|
||||
#include <sys/unistd.h>
|
||||
#include <sys/vnode.h>
|
||||
|
||||
#include <bsm/audit.h>
|
||||
#include <bsm/audit_internal.h>
|
||||
#include <bsm/audit_kevents.h>
|
||||
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/in_pcb.h>
|
||||
|
||||
#include <security/audit/audit.h>
|
||||
#include <security/audit/audit_private.h>
|
||||
|
||||
#include <vm/uma.h>
|
||||
|
||||
/*
|
||||
* Worker thread that will schedule disk I/O, etc.
|
||||
*/
|
||||
static struct proc *audit_thread;
|
||||
|
||||
/*
|
||||
* When an audit log is rotated, the actual rotation must be performed by the
|
||||
* audit worker thread, as it may have outstanding writes on the current
|
||||
* audit log. audit_replacement_vp holds the vnode replacing the current
|
||||
* vnode. We can't let more than one replacement occur at a time, so if more
|
||||
* than one thread requests a replacement, only one can have the replacement
|
||||
* "in progress" at any given moment. If a thread tries to replace the audit
|
||||
* vnode and discovers a replacement is already in progress (i.e.,
|
||||
* audit_replacement_flag != 0), then it will sleep on audit_replacement_cv
|
||||
* waiting its turn to perform a replacement. When a replacement is
|
||||
* completed, this cv is signalled by the worker thread so a waiting thread
|
||||
* can start another replacement. We also store a credential to perform
|
||||
* audit log write operations with.
|
||||
*
|
||||
* The current credential and vnode are thread-local to audit_worker.
|
||||
*/
|
||||
static struct cv audit_replacement_cv;
|
||||
|
||||
static int audit_replacement_flag;
|
||||
static struct vnode *audit_replacement_vp;
|
||||
static struct ucred *audit_replacement_cred;
|
||||
|
||||
/*
|
||||
* Flags related to Kernel->user-space communication.
|
||||
*/
|
||||
static int audit_file_rotate_wait;
|
||||
|
||||
/*
|
||||
* XXXAUDIT: Should adjust comments below to make it clear that we get to
|
||||
* this point only if we believe we have storage, so not having space here is
|
||||
* a violation of invariants derived from administrative procedures. I.e.,
|
||||
* someone else has written to the audit partition, leaving less space than
|
||||
* we accounted for.
|
||||
*/
|
||||
static int
|
||||
audit_record_write(struct vnode *vp, struct ucred *cred, struct thread *td,
|
||||
void *data, size_t len)
|
||||
{
|
||||
int ret;
|
||||
long temp;
|
||||
struct vattr vattr;
|
||||
struct statfs *mnt_stat;
|
||||
int vfslocked;
|
||||
|
||||
if (vp == NULL)
|
||||
return (0);
|
||||
|
||||
mnt_stat = &vp->v_mount->mnt_stat;
|
||||
vfslocked = VFS_LOCK_GIANT(vp->v_mount);
|
||||
|
||||
/*
|
||||
* First, gather statistics on the audit log file and file system so
|
||||
* that we know how we're doing on space. In both cases, if we're
|
||||
* unable to perform the operation, we drop the record and return.
|
||||
* However, this is arguably an assertion failure.
|
||||
* XXX Need a FreeBSD equivalent.
|
||||
*/
|
||||
ret = VFS_STATFS(vp->v_mount, mnt_stat, td);
|
||||
if (ret)
|
||||
goto out;
|
||||
|
||||
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, td);
|
||||
ret = VOP_GETATTR(vp, &vattr, cred, td);
|
||||
VOP_UNLOCK(vp, 0, td);
|
||||
if (ret)
|
||||
goto out;
|
||||
|
||||
/* update the global stats struct */
|
||||
audit_fstat.af_currsz = vattr.va_size;
|
||||
|
||||
/*
|
||||
* XXX Need to decide what to do if the trigger to the audit daemon
|
||||
* fails.
|
||||
*/
|
||||
|
||||
/*
|
||||
* If we fall below minimum free blocks (hard limit), tell the audit
|
||||
* daemon to force a rotation off of the file system. We also stop
|
||||
* writing, which means this audit record is probably lost. If we
|
||||
* fall below the minimum percent free blocks (soft limit), then
|
||||
* kindly suggest to the audit daemon to do something.
|
||||
*/
|
||||
if (mnt_stat->f_bfree < AUDIT_HARD_LIMIT_FREE_BLOCKS) {
|
||||
(void)send_trigger(AUDIT_TRIGGER_NO_SPACE);
|
||||
/*
|
||||
* Hopefully userspace did something about all the previous
|
||||
* triggers that were sent prior to this critical condition.
|
||||
* If fail-stop is set, then we're done; goodnight Gracie.
|
||||
*/
|
||||
if (audit_fail_stop)
|
||||
panic("Audit log space exhausted and fail-stop set.");
|
||||
else {
|
||||
audit_suspended = 1;
|
||||
ret = ENOSPC;
|
||||
goto out;
|
||||
}
|
||||
} else
|
||||
/*
|
||||
* Send a message to the audit daemon that disk space is
|
||||
* getting low.
|
||||
*
|
||||
* XXXAUDIT: Check math and block size calculation here.
|
||||
*/
|
||||
if (audit_qctrl.aq_minfree != 0) {
|
||||
temp = mnt_stat->f_blocks / (100 /
|
||||
audit_qctrl.aq_minfree);
|
||||
if (mnt_stat->f_bfree < temp)
|
||||
(void)send_trigger(AUDIT_TRIGGER_LOW_SPACE);
|
||||
}
|
||||
|
||||
/*
|
||||
* Check if the current log file is full; if so, call for a log
|
||||
* rotate. This is not an exact comparison; we may write some records
|
||||
* over the limit. If that's not acceptable, then add a fudge factor
|
||||
* here.
|
||||
*/
|
||||
if ((audit_fstat.af_filesz != 0) &&
|
||||
(audit_file_rotate_wait == 0) &&
|
||||
(vattr.va_size >= audit_fstat.af_filesz)) {
|
||||
audit_file_rotate_wait = 1;
|
||||
(void)send_trigger(AUDIT_TRIGGER_OPEN_NEW);
|
||||
}
|
||||
|
||||
/*
|
||||
* If the estimated amount of audit data in the audit event queue
|
||||
* (plus records allocated but not yet queued) has reached the amount
|
||||
* of free space on the disk, then we need to go into an audit fail
|
||||
* stop state, in which we do not permit the allocation/committing of
|
||||
* any new audit records. We continue to process packets but don't
|
||||
* allow any activities that might generate new records. In the
|
||||
* future, we might want to detect when space is available again and
|
||||
* allow operation to continue, but this behavior is sufficient to
|
||||
* meet fail stop requirements in CAPP.
|
||||
*/
|
||||
if (audit_fail_stop &&
|
||||
(unsigned long)
|
||||
((audit_q_len + audit_pre_q_len + 1) * MAX_AUDIT_RECORD_SIZE) /
|
||||
mnt_stat->f_bsize >= (unsigned long)(mnt_stat->f_bfree)) {
|
||||
printf("audit_record_write: free space below size of audit "
|
||||
"queue, failing stop\n");
|
||||
audit_in_failure = 1;
|
||||
}
|
||||
|
||||
ret = vn_rdwr(UIO_WRITE, vp, data, len, (off_t)0, UIO_SYSSPACE,
|
||||
IO_APPEND|IO_UNIT, cred, NULL, NULL, td);
|
||||
|
||||
out:
|
||||
/*
|
||||
* When we're done processing the current record, we have to check to
|
||||
* see if we're in a failure mode, and if so, whether this was the
|
||||
* last record left to be drained. If we're done draining, then we
|
||||
* fsync the vnode and panic.
|
||||
*/
|
||||
if (audit_in_failure && audit_q_len == 0 && audit_pre_q_len == 0) {
|
||||
VOP_LOCK(vp, LK_DRAIN | LK_INTERLOCK, td);
|
||||
(void)VOP_FSYNC(vp, MNT_WAIT, td);
|
||||
VOP_UNLOCK(vp, 0, td);
|
||||
panic("Audit store overflow; record queue drained.");
|
||||
}
|
||||
|
||||
VFS_UNLOCK_GIANT(vfslocked);
|
||||
|
||||
return (ret);
|
||||
}
|
||||
|
||||
/*
|
||||
* If an appropriate signal has been received rotate the audit log based on
|
||||
* the global replacement variables. Signal consumers as needed that the
|
||||
* rotation has taken place.
|
||||
*
|
||||
* XXXRW: The global variables and CVs used to signal the audit_worker to
|
||||
* perform a rotation are essentially a message queue of depth 1. It would
|
||||
* be much nicer to actually use a message queue.
|
||||
*/
|
||||
static void
|
||||
audit_worker_rotate(struct ucred **audit_credp, struct vnode **audit_vpp,
|
||||
struct thread *audit_td)
|
||||
{
|
||||
int do_replacement_signal, vfslocked;
|
||||
struct ucred *old_cred;
|
||||
struct vnode *old_vp;
|
||||
|
||||
mtx_assert(&audit_mtx, MA_OWNED);
|
||||
|
||||
do_replacement_signal = 0;
|
||||
while (audit_replacement_flag != 0) {
|
||||
old_cred = *audit_credp;
|
||||
old_vp = *audit_vpp;
|
||||
*audit_credp = audit_replacement_cred;
|
||||
*audit_vpp = audit_replacement_vp;
|
||||
audit_replacement_cred = NULL;
|
||||
audit_replacement_vp = NULL;
|
||||
audit_replacement_flag = 0;
|
||||
|
||||
audit_enabled = (*audit_vpp != NULL);
|
||||
|
||||
/*
|
||||
* XXX: What to do about write failures here?
|
||||
*/
|
||||
if (old_vp != NULL) {
|
||||
AUDIT_PRINTF(("Closing old audit file\n"));
|
||||
mtx_unlock(&audit_mtx);
|
||||
vfslocked = VFS_LOCK_GIANT(old_vp->v_mount);
|
||||
vn_close(old_vp, AUDIT_CLOSE_FLAGS, old_cred,
|
||||
audit_td);
|
||||
VFS_UNLOCK_GIANT(vfslocked);
|
||||
crfree(old_cred);
|
||||
mtx_lock(&audit_mtx);
|
||||
old_cred = NULL;
|
||||
old_vp = NULL;
|
||||
AUDIT_PRINTF(("Audit file closed\n"));
|
||||
}
|
||||
if (*audit_vpp != NULL) {
|
||||
AUDIT_PRINTF(("Opening new audit file\n"));
|
||||
}
|
||||
do_replacement_signal = 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* Signal that replacement have occurred to wake up and
|
||||
* start any other replacements started in parallel. We can
|
||||
* continue about our business in the mean time. We
|
||||
* broadcast so that both new replacements can be inserted,
|
||||
* but also so that the source(s) of replacement can return
|
||||
* successfully.
|
||||
*/
|
||||
if (do_replacement_signal)
|
||||
cv_broadcast(&audit_replacement_cv);
|
||||
}
|
||||
|
||||
/*
|
||||
* Given a kernel audit record, process as required. Kernel audit records
|
||||
* are converted to one, or possibly two, BSM records, depending on whether
|
||||
* there is a user audit record present also. Kernel records need be
|
||||
* converted to BSM before they can be written out. Both types will be
|
||||
* written to disk, and audit pipes.
|
||||
*/
|
||||
static void
|
||||
audit_worker_process_record(struct vnode *audit_vp, struct ucred *audit_cred,
|
||||
struct thread *audit_td, struct kaudit_record *ar)
|
||||
{
|
||||
struct au_record *bsm;
|
||||
au_class_t class;
|
||||
au_event_t event;
|
||||
int error, ret;
|
||||
au_id_t auid;
|
||||
int sorf;
|
||||
|
||||
if ((ar->k_ar_commit & AR_COMMIT_USER) &&
|
||||
(ar->k_ar_commit & AR_PRESELECT_TRAIL)) {
|
||||
error = audit_record_write(audit_vp, audit_cred, audit_td,
|
||||
ar->k_udata, ar->k_ulen);
|
||||
if (error && audit_panic_on_write_fail)
|
||||
panic("audit_worker: write error %d\n", error);
|
||||
else if (error)
|
||||
printf("audit_worker: write error %d\n", error);
|
||||
}
|
||||
if ((ar->k_ar_commit & AR_COMMIT_USER) &&
|
||||
(ar->k_ar_commit & AR_PRESELECT_PIPE))
|
||||
audit_pipe_submit_user(ar->k_udata, ar->k_ulen);
|
||||
|
||||
if (!(ar->k_ar_commit & AR_COMMIT_KERNEL))
|
||||
return;
|
||||
|
||||
auid = ar->k_ar.ar_subj_auid;
|
||||
event = ar->k_ar.ar_event;
|
||||
class = au_event_class(event);
|
||||
if (ar->k_ar.ar_errno == 0)
|
||||
sorf = AU_PRS_SUCCESS;
|
||||
else
|
||||
sorf = AU_PRS_FAILURE;
|
||||
|
||||
ret = kaudit_to_bsm(ar, &bsm);
|
||||
switch (ret) {
|
||||
case BSM_NOAUDIT:
|
||||
return;
|
||||
|
||||
case BSM_FAILURE:
|
||||
printf("audit_worker_process_record: BSM_FAILURE\n");
|
||||
return;
|
||||
|
||||
case BSM_SUCCESS:
|
||||
break;
|
||||
|
||||
default:
|
||||
panic("kaudit_to_bsm returned %d", ret);
|
||||
}
|
||||
|
||||
if (ar->k_ar_commit & AR_PRESELECT_TRAIL) {
|
||||
error = audit_record_write(audit_vp, audit_cred,
|
||||
audit_td, bsm->data, bsm->len);
|
||||
if (error && audit_panic_on_write_fail)
|
||||
panic("audit_worker: write error %d\n",
|
||||
error);
|
||||
else if (error)
|
||||
printf("audit_worker: write error %d\n",
|
||||
error);
|
||||
}
|
||||
if (ar->k_ar_commit & AR_PRESELECT_PIPE)
|
||||
audit_pipe_submit(auid, event, class, sorf,
|
||||
ar->k_ar_commit & AR_PRESELECT_TRAIL, bsm->data,
|
||||
bsm->len);
|
||||
kau_free(bsm);
|
||||
}
|
||||
|
||||
/*
|
||||
* The audit_worker thread is responsible for watching the event queue,
|
||||
* dequeueing records, converting them to BSM format, and committing them to
|
||||
* disk. In order to minimize lock thrashing, records are dequeued in sets
|
||||
* to a thread-local work queue. In addition, the audit_work performs the
|
||||
* actual exchange of audit log vnode pointer, as audit_vp is a thread-local
|
||||
* variable.
|
||||
*/
|
||||
static void
|
||||
audit_worker(void *arg)
|
||||
{
|
||||
struct kaudit_queue ar_worklist;
|
||||
struct kaudit_record *ar;
|
||||
struct ucred *audit_cred;
|
||||
struct thread *audit_td;
|
||||
struct vnode *audit_vp;
|
||||
int lowater_signal;
|
||||
|
||||
AUDIT_PRINTF(("audit_worker starting\n"));
|
||||
|
||||
/*
|
||||
* These are thread-local variables requiring no synchronization.
|
||||
*/
|
||||
TAILQ_INIT(&ar_worklist);
|
||||
audit_cred = NULL;
|
||||
audit_td = curthread;
|
||||
audit_vp = NULL;
|
||||
|
||||
mtx_lock(&audit_mtx);
|
||||
while (1) {
|
||||
mtx_assert(&audit_mtx, MA_OWNED);
|
||||
|
||||
/*
|
||||
* Wait for record or rotation events.
|
||||
*/
|
||||
while (!audit_replacement_flag && TAILQ_EMPTY(&audit_q)) {
|
||||
AUDIT_PRINTF(("audit_worker waiting\n"));
|
||||
cv_wait(&audit_worker_cv, &audit_mtx);
|
||||
AUDIT_PRINTF(("audit_worker woken up\n"));
|
||||
AUDIT_PRINTF(("audit_worker: new vp = %p; value of "
|
||||
"flag %d\n", audit_replacement_vp,
|
||||
audit_replacement_flag));
|
||||
}
|
||||
|
||||
/*
|
||||
* First priority: replace the audit log target if requested.
|
||||
*/
|
||||
audit_worker_rotate(&audit_cred, &audit_vp, audit_td);
|
||||
|
||||
/*
|
||||
* If there are records in the global audit record queue,
|
||||
* transfer them to a thread-local queue and process them
|
||||
* one by one. If we cross the low watermark threshold,
|
||||
* signal any waiting processes that they may wake up and
|
||||
* continue generating records.
|
||||
*/
|
||||
lowater_signal = 0;
|
||||
while ((ar = TAILQ_FIRST(&audit_q))) {
|
||||
TAILQ_REMOVE(&audit_q, ar, k_q);
|
||||
audit_q_len--;
|
||||
if (audit_q_len == audit_qctrl.aq_lowater)
|
||||
lowater_signal++;
|
||||
TAILQ_INSERT_TAIL(&ar_worklist, ar, k_q);
|
||||
}
|
||||
if (lowater_signal)
|
||||
cv_broadcast(&audit_watermark_cv);
|
||||
|
||||
mtx_unlock(&audit_mtx);
|
||||
while ((ar = TAILQ_FIRST(&ar_worklist))) {
|
||||
TAILQ_REMOVE(&ar_worklist, ar, k_q);
|
||||
audit_worker_process_record(audit_vp, audit_cred,
|
||||
audit_td, ar);
|
||||
audit_free(ar);
|
||||
}
|
||||
mtx_lock(&audit_mtx);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* audit_rotate_vnode() is called by a user or kernel thread to configure or
|
||||
* de-configure auditing on a vnode. The arguments are the replacement
|
||||
* credential and vnode to substitute for the current credential and vnode,
|
||||
* if any. If either is set to NULL, both should be NULL, and this is used
|
||||
* to indicate that audit is being disabled. The real work is done in the
|
||||
* audit_worker thread, but audit_rotate_vnode() waits synchronously for that
|
||||
* to complete.
|
||||
*
|
||||
* The vnode should be referenced and opened by the caller. The credential
|
||||
* should be referenced. audit_rotate_vnode() will own both references as of
|
||||
* this call, so the caller should not release either.
|
||||
*
|
||||
* XXXAUDIT: Review synchronize communication logic. Really, this is a
|
||||
* message queue of depth 1.
|
||||
*
|
||||
* XXXAUDIT: Enhance the comments below to indicate that we are basically
|
||||
* acquiring ownership of the communications queue, inserting our message,
|
||||
* and waiting for an acknowledgement.
|
||||
*/
|
||||
void
|
||||
audit_rotate_vnode(struct ucred *cred, struct vnode *vp)
|
||||
{
|
||||
|
||||
/*
|
||||
* If other parallel log replacements have been requested, we wait
|
||||
* until they've finished before continuing.
|
||||
*/
|
||||
mtx_lock(&audit_mtx);
|
||||
while (audit_replacement_flag != 0) {
|
||||
AUDIT_PRINTF(("audit_rotate_vnode: sleeping to wait for "
|
||||
"flag\n"));
|
||||
cv_wait(&audit_replacement_cv, &audit_mtx);
|
||||
AUDIT_PRINTF(("audit_rotate_vnode: woken up (flag %d)\n",
|
||||
audit_replacement_flag));
|
||||
}
|
||||
audit_replacement_cred = cred;
|
||||
audit_replacement_flag = 1;
|
||||
audit_replacement_vp = vp;
|
||||
|
||||
/*
|
||||
* Wake up the audit worker to perform the exchange once we
|
||||
* release the mutex.
|
||||
*/
|
||||
cv_signal(&audit_worker_cv);
|
||||
|
||||
/*
|
||||
* Wait for the audit_worker to broadcast that a replacement has
|
||||
* taken place; we know that once this has happened, our vnode
|
||||
* has been replaced in, so we can return successfully.
|
||||
*/
|
||||
AUDIT_PRINTF(("audit_rotate_vnode: waiting for news of "
|
||||
"replacement\n"));
|
||||
cv_wait(&audit_replacement_cv, &audit_mtx);
|
||||
AUDIT_PRINTF(("audit_rotate_vnode: change acknowledged by "
|
||||
"audit_worker (flag " "now %d)\n", audit_replacement_flag));
|
||||
mtx_unlock(&audit_mtx);
|
||||
|
||||
audit_file_rotate_wait = 0; /* We can now request another rotation */
|
||||
}
|
||||
|
||||
void
|
||||
audit_worker_init(void)
|
||||
{
|
||||
int error;
|
||||
|
||||
cv_init(&audit_replacement_cv, "audit_replacement_cv");
|
||||
error = kthread_create(audit_worker, NULL, &audit_thread, RFHIGHPID,
|
||||
0, "audit_worker");
|
||||
if (error)
|
||||
panic("audit_worker_init: kthread_create returned %d", error);
|
||||
}
|
51
tools/regression/geom_eli/init-a.t
Normal file
51
tools/regression/geom_eli/init-a.t
Normal file
@ -0,0 +1,51 @@
|
||||
#!/bin/sh
|
||||
# $FreeBSD$
|
||||
|
||||
base=`basename $0`
|
||||
no=45
|
||||
sectors=100
|
||||
keyfile=`mktemp /tmp/$base.XXXXXX` || exit 1
|
||||
|
||||
echo "1..540"
|
||||
|
||||
i=1
|
||||
for cipher in aes:0 aes:128 aes:192 aes:256 \
|
||||
3des:0 3des:192 \
|
||||
blowfish:0 blowfish:128 blowfish:160 blowfish:192 blowfish:224 \
|
||||
blowfish:256 blowfish:288 blowfish:320 blowfish:352 blowfish:384 \
|
||||
blowfish:416 blowfish:448; do
|
||||
ealgo=${cipher%%:*}
|
||||
keylen=${cipher##*:}
|
||||
for aalgo in hmac/md5 hmac/sha1 hmac/ripemd160 hmac/sha256 hmac/sha384 hmac/sha512; do
|
||||
for secsize in 512 1024 2048 4096 8192; do
|
||||
rnd=`mktemp /tmp/$base.XXXXXX` || exit 1
|
||||
mdconfig -a -t malloc -s `expr $secsize \* $sectors + 512`b -u $no || exit 1
|
||||
|
||||
dd if=/dev/random of=${keyfile} bs=512 count=16 >/dev/null 2>&1
|
||||
|
||||
geli init -a $aalgo -e $ealgo -l $keylen -P -K $keyfile -s $secsize md${no}
|
||||
geli attach -p -k $keyfile md${no}
|
||||
|
||||
secs=`diskinfo /dev/md${no}.eli | awk '{print $4}'`
|
||||
|
||||
dd if=/dev/random of=${rnd} bs=${secsize} count=${secs} >/dev/null 2>&1
|
||||
dd if=${rnd} of=/dev/md${no}.eli bs=${secsize} count=${secs} 2>/dev/null
|
||||
|
||||
md_rnd=`dd if=${rnd} bs=${secsize} count=${secs} 2>/dev/null | md5`
|
||||
md_ddev=`dd if=/dev/md${no}.eli bs=${secsize} count=${secs} 2>/dev/null | md5`
|
||||
|
||||
if [ ${md_rnd} = ${md_ddev} ]; then
|
||||
echo "ok $i - aalgo=${aalgo} ealgo=${ealgo} keylen=${keylen} sec=${secsize}"
|
||||
else
|
||||
echo "not ok $i - aalgo=${aalgo} ealgo=${ealgo} keylen=${keylen} sec=${secsize}"
|
||||
fi
|
||||
i=$((i+1))
|
||||
|
||||
geli detach md${no}
|
||||
rm -f $rnd
|
||||
mdconfig -d -u $no
|
||||
done
|
||||
done
|
||||
done
|
||||
|
||||
rm -f $keyfile
|
90
tools/regression/geom_eli/integrity-copy.t
Normal file
90
tools/regression/geom_eli/integrity-copy.t
Normal file
@ -0,0 +1,90 @@
|
||||
#!/bin/sh
|
||||
# $FreeBSD$
|
||||
|
||||
base=`basename $0`
|
||||
no=45
|
||||
sectors=100
|
||||
keyfile=`mktemp /tmp/$base.XXXXXX` || exit 1
|
||||
sector=`mktemp /tmp/$base.XXXXXX` || exit 1
|
||||
|
||||
echo "1..2160"
|
||||
|
||||
i=1
|
||||
for cipher in aes:0 aes:128 aes:192 aes:256 \
|
||||
3des:0 3des:192 \
|
||||
blowfish:0 blowfish:128 blowfish:160 blowfish:192 blowfish:224 \
|
||||
blowfish:256 blowfish:288 blowfish:320 blowfish:352 blowfish:384 \
|
||||
blowfish:416 blowfish:448; do
|
||||
ealgo=${cipher%%:*}
|
||||
keylen=${cipher##*:}
|
||||
for aalgo in hmac/md5 hmac/sha1 hmac/ripemd160 hmac/sha256 hmac/sha384 hmac/sha512; do
|
||||
for secsize in 512 1024 2048 4096 8192; do
|
||||
#mdconfig -a -t malloc -s `expr $secsize \* 2 + 512`b -u $no || exit 1
|
||||
mdconfig -a -t malloc -s $sectors -u $no || exit 1
|
||||
|
||||
dd if=/dev/random of=${keyfile} bs=512 count=16 >/dev/null 2>&1
|
||||
|
||||
geli init -a $aalgo -e $ealgo -l $keylen -P -K $keyfile -s $secsize md${no}
|
||||
geli attach -p -k $keyfile md${no}
|
||||
|
||||
dd if=/dev/random of=/dev/md${no}.eli bs=${secsize} count=1 >/dev/null 2>&1
|
||||
|
||||
dd if=/dev/md${no}.eli bs=${secsize} count=1 >/dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "ok $i - small 1 aalgo=${aalgo} ealgo=${ealgo} keylen=${keylen} sec=${secsize}"
|
||||
else
|
||||
echo "not ok $i - small 1 aalgo=${aalgo} ealgo=${ealgo} keylen=${keylen} sec=${secsize}"
|
||||
fi
|
||||
i=$((i+1))
|
||||
|
||||
geli detach md${no}
|
||||
# Copy first small sector to the second small sector.
|
||||
# This should be detected as corruption.
|
||||
dd if=/dev/md${no} of=${sector} bs=512 count=1 >/dev/null 2>&1
|
||||
dd if=${sector} of=/dev/md${no} bs=512 count=1 seek=1 >/dev/null 2>&1
|
||||
geli attach -p -k $keyfile md${no}
|
||||
|
||||
dd if=/dev/md${no}.eli of=/dev/null bs=${secsize} count=1 >/dev/null 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "ok $i - small 2 aalgo=${aalgo} ealgo=${ealgo} keylen=${keylen} sec=${secsize}"
|
||||
else
|
||||
echo "not ok $i - small 2 aalgo=${aalgo} ealgo=${ealgo} keylen=${keylen} sec=${secsize}"
|
||||
fi
|
||||
i=$((i+1))
|
||||
|
||||
ms=`diskinfo /dev/md${no} | awk '{print $3 - 512}'`
|
||||
ns=`diskinfo /dev/md${no}.eli | awk '{print $4}'`
|
||||
usecsize=`echo "($ms / $ns) - (($ms / $ns) % 512)" | bc`
|
||||
|
||||
dd if=/dev/random of=/dev/md${no}.eli bs=${secsize} count=2 >/dev/null 2>&1
|
||||
|
||||
dd if=/dev/md${no}.eli bs=${secsize} count=2 >/dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "ok $i - big 1 aalgo=${aalgo} ealgo=${ealgo} keylen=${keylen} sec=${secsize}"
|
||||
else
|
||||
echo "not ok $i - big 1 aalgo=${aalgo} ealgo=${ealgo} keylen=${keylen} sec=${secsize}"
|
||||
fi
|
||||
i=$((i+1))
|
||||
|
||||
geli detach md${no}
|
||||
# Copy first big sector to the second big sector.
|
||||
# This should be detected as corruption.
|
||||
dd if=/dev/md${no} of=${sector} bs=${usecsize} count=1 >/dev/null 2>&1
|
||||
dd if=${sector} of=/dev/md${no} bs=${usecsize} count=1 seek=1 >/dev/null 2>&1
|
||||
geli attach -p -k $keyfile md${no}
|
||||
|
||||
dd if=/dev/md${no}.eli of=/dev/null bs=${secsize} count=2 >/dev/null 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "ok $i - big 2 aalgo=${aalgo} ealgo=${ealgo} keylen=${keylen} sec=${secsize}"
|
||||
else
|
||||
echo "not ok $i - big 2 aalgo=${aalgo} ealgo=${ealgo} keylen=${keylen} sec=${secsize}"
|
||||
fi
|
||||
i=$((i+1))
|
||||
|
||||
geli detach md${no}
|
||||
mdconfig -d -u $no
|
||||
done
|
||||
done
|
||||
done
|
||||
|
||||
rm -f $keyfile $sector
|
60
tools/regression/geom_eli/integrity-data.t
Normal file
60
tools/regression/geom_eli/integrity-data.t
Normal file
@ -0,0 +1,60 @@
|
||||
#!/bin/sh
|
||||
# $FreeBSD$
|
||||
|
||||
base=`basename $0`
|
||||
no=45
|
||||
sectors=100
|
||||
keyfile=`mktemp /tmp/$base.XXXXXX` || exit 1
|
||||
sector=`mktemp /tmp/$base.XXXXXX` || exit 1
|
||||
|
||||
echo "1..1080"
|
||||
|
||||
i=1
|
||||
for cipher in aes:0 aes:128 aes:192 aes:256 \
|
||||
3des:0 3des:192 \
|
||||
blowfish:0 blowfish:128 blowfish:160 blowfish:192 blowfish:224 \
|
||||
blowfish:256 blowfish:288 blowfish:320 blowfish:352 blowfish:384 \
|
||||
blowfish:416 blowfish:448; do
|
||||
ealgo=${cipher%%:*}
|
||||
keylen=${cipher##*:}
|
||||
for aalgo in hmac/md5 hmac/sha1 hmac/ripemd160 hmac/sha256 hmac/sha384 hmac/sha512; do
|
||||
for secsize in 512 1024 2048 4096 8192; do
|
||||
mdconfig -a -t malloc -s `expr $secsize \* 2 + 512`b -u $no || exit 1
|
||||
|
||||
dd if=/dev/random of=${keyfile} bs=512 count=16 >/dev/null 2>&1
|
||||
|
||||
geli init -a $aalgo -e $ealgo -l $keylen -P -K $keyfile -s $secsize md${no}
|
||||
geli attach -p -k $keyfile md${no}
|
||||
|
||||
dd if=/dev/random of=/dev/md${no}.eli bs=${secsize} count=1 >/dev/null 2>&1
|
||||
|
||||
dd if=/dev/md${no}.eli bs=${secsize} count=1 >/dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "ok $i - aalgo=${aalgo} ealgo=${ealgo} keylen=${keylen} sec=${secsize}"
|
||||
else
|
||||
echo "not ok $i - aalgo=${aalgo} ealgo=${ealgo} keylen=${keylen} sec=${secsize}"
|
||||
fi
|
||||
i=$((i+1))
|
||||
|
||||
geli detach md${no}
|
||||
# Corrupt 8 bytes of data.
|
||||
dd if=/dev/md${no} of=${sector} bs=512 count=1 >/dev/null 2>&1
|
||||
dd if=/dev/random of=${sector} bs=1 count=8 seek=64 conv=notrunc >/dev/null 2>&1
|
||||
dd if=${sector} of=/dev/md${no} bs=512 count=1 >/dev/null 2>&1
|
||||
geli attach -p -k $keyfile md${no}
|
||||
|
||||
dd if=/dev/md${no}.eli of=/dev/null bs=${secsize} count=1 >/dev/null 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "ok $i - aalgo=${aalgo} ealgo=${ealgo} keylen=${keylen} sec=${secsize}"
|
||||
else
|
||||
echo "not ok $i - aalgo=${aalgo} ealgo=${ealgo} keylen=${keylen} sec=${secsize}"
|
||||
fi
|
||||
i=$((i+1))
|
||||
|
||||
geli detach md${no}
|
||||
mdconfig -d -u $no
|
||||
done
|
||||
done
|
||||
done
|
||||
|
||||
rm -f $keyfile $sector
|
60
tools/regression/geom_eli/integrity-hmac.t
Normal file
60
tools/regression/geom_eli/integrity-hmac.t
Normal file
@ -0,0 +1,60 @@
|
||||
#!/bin/sh
|
||||
# $FreeBSD$
|
||||
|
||||
base=`basename $0`
|
||||
no=45
|
||||
sectors=100
|
||||
keyfile=`mktemp /tmp/$base.XXXXXX` || exit 1
|
||||
sector=`mktemp /tmp/$base.XXXXXX` || exit 1
|
||||
|
||||
echo "1..1080"
|
||||
|
||||
i=1
|
||||
for cipher in aes:0 aes:128 aes:192 aes:256 \
|
||||
3des:0 3des:192 \
|
||||
blowfish:0 blowfish:128 blowfish:160 blowfish:192 blowfish:224 \
|
||||
blowfish:256 blowfish:288 blowfish:320 blowfish:352 blowfish:384 \
|
||||
blowfish:416 blowfish:448; do
|
||||
ealgo=${cipher%%:*}
|
||||
keylen=${cipher##*:}
|
||||
for aalgo in hmac/md5 hmac/sha1 hmac/ripemd160 hmac/sha256 hmac/sha384 hmac/sha512; do
|
||||
for secsize in 512 1024 2048 4096 8192; do
|
||||
mdconfig -a -t malloc -s `expr $secsize \* 2 + 512`b -u $no || exit 1
|
||||
|
||||
dd if=/dev/random of=${keyfile} bs=512 count=16 >/dev/null 2>&1
|
||||
|
||||
geli init -a $aalgo -e $ealgo -l $keylen -P -K $keyfile -s $secsize md${no}
|
||||
geli attach -p -k $keyfile md${no}
|
||||
|
||||
dd if=/dev/random of=/dev/md${no}.eli bs=${secsize} count=1 >/dev/null 2>&1
|
||||
|
||||
dd if=/dev/md${no}.eli bs=${secsize} count=1 >/dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "ok $i - aalgo=${aalgo} ealgo=${ealgo} keylen=${keylen} sec=${secsize}"
|
||||
else
|
||||
echo "not ok $i - aalgo=${aalgo} ealgo=${ealgo} keylen=${keylen} sec=${secsize}"
|
||||
fi
|
||||
i=$((i+1))
|
||||
|
||||
geli detach md${no}
|
||||
# Corrupt 8 bytes of HMAC.
|
||||
dd if=/dev/md${no} of=${sector} bs=512 count=1 >/dev/null 2>&1
|
||||
dd if=/dev/random of=${sector} bs=1 count=16 conv=notrunc >/dev/null 2>&1
|
||||
dd if=${sector} of=/dev/md${no} bs=512 count=1 >/dev/null 2>&1
|
||||
geli attach -p -k $keyfile md${no}
|
||||
|
||||
dd if=/dev/md${no}.eli bs=${secsize} count=1 >/dev/null 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "ok $i - aalgo=${aalgo} ealgo=${ealgo} keylen=${keylen} sec=${secsize}"
|
||||
else
|
||||
echo "not ok $i - aalgo=${aalgo} ealgo=${ealgo} keylen=${keylen} sec=${secsize}"
|
||||
fi
|
||||
i=$((i+1))
|
||||
|
||||
geli detach md${no}
|
||||
mdconfig -d -u $no
|
||||
done
|
||||
done
|
||||
done
|
||||
|
||||
rm -f $keyfile $sector
|
45
tools/regression/geom_eli/onetime-a.t
Normal file
45
tools/regression/geom_eli/onetime-a.t
Normal file
@ -0,0 +1,45 @@
|
||||
#!/bin/sh
|
||||
# $FreeBSD$
|
||||
|
||||
base=`basename $0`
|
||||
no=45
|
||||
sectors=100
|
||||
|
||||
echo "1..540"
|
||||
|
||||
i=1
|
||||
for cipher in aes:0 aes:128 aes:192 aes:256 \
|
||||
3des:0 3des:192 \
|
||||
blowfish:0 blowfish:128 blowfish:160 blowfish:192 blowfish:224 \
|
||||
blowfish:256 blowfish:288 blowfish:320 blowfish:352 blowfish:384 \
|
||||
blowfish:416 blowfish:448; do
|
||||
ealgo=${cipher%%:*}
|
||||
keylen=${cipher##*:}
|
||||
for aalgo in hmac/md5 hmac/sha1 hmac/ripemd160 hmac/sha256 hmac/sha384 hmac/sha512; do
|
||||
for secsize in 512 1024 2048 4096 8192; do
|
||||
rnd=`mktemp /tmp/$base.XXXXXX` || exit 1
|
||||
mdconfig -a -t malloc -s `expr $secsize \* $sectors + 512`b -u $no || exit 1
|
||||
|
||||
geli onetime -a $aalgo -e $ealgo -l $keylen -s $secsize md${no}
|
||||
|
||||
secs=`diskinfo /dev/md${no}.eli | awk '{print $4}'`
|
||||
|
||||
dd if=/dev/random of=${rnd} bs=${secsize} count=${secs} >/dev/null 2>&1
|
||||
dd if=${rnd} of=/dev/md${no}.eli bs=${secsize} count=${secs} 2>/dev/null
|
||||
|
||||
md_rnd=`dd if=${rnd} bs=${secsize} count=${secs} 2>/dev/null | md5`
|
||||
md_ddev=`dd if=/dev/md${no}.eli bs=${secsize} count=${secs} 2>/dev/null | md5`
|
||||
|
||||
if [ ${md_rnd} = ${md_ddev} ]; then
|
||||
echo "ok $i - aalgo=${aalgo} ealgo=${ealgo} keylen=${keylen} sec=${secsize}"
|
||||
else
|
||||
echo "not ok $i - aalgo=${aalgo} ealgo=${ealgo} keylen=${keylen} sec=${secsize}"
|
||||
fi
|
||||
i=$((i+1))
|
||||
|
||||
geli detach md${no}
|
||||
rm -f $rnd
|
||||
mdconfig -d -u $no
|
||||
done
|
||||
done
|
||||
done
|
89
tools/regression/ipsec/ipsec.t
Normal file
89
tools/regression/ipsec/ipsec.t
Normal file
@ -0,0 +1,89 @@
|
||||
#!/bin/sh
|
||||
# $FreeBSD$
|
||||
|
||||
ipbase="127.255"
|
||||
netif="lo0"
|
||||
spi="10000"
|
||||
|
||||
echo "1..306"
|
||||
|
||||
#sysctl net.inet.ipsec.crypto_support=1 >/dev/null 2>&1
|
||||
|
||||
ifconfig $netif alias ${ipbase}.0.1/24
|
||||
ifconfig $netif alias ${ipbase}.1.1/24
|
||||
|
||||
i=1
|
||||
|
||||
for ecipher in \
|
||||
des-cbc:12345678 \
|
||||
3des-cbc:012345678901234567890123 \
|
||||
blowfish-cbc:0123456789012345 \
|
||||
blowfish-cbc:01234567890123456789 \
|
||||
blowfish-cbc:012345678901234567890123 \
|
||||
blowfish-cbc:0123456789012345678901234567 \
|
||||
blowfish-cbc:01234567890123456789012345678901 \
|
||||
blowfish-cbc:012345678901234567890123456789012345 \
|
||||
blowfish-cbc:0123456789012345678901234567890123456789 \
|
||||
blowfish-cbc:01234567890123456789012345678901234567890123 \
|
||||
blowfish-cbc:012345678901234567890123456789012345678901234567 \
|
||||
blowfish-cbc:0123456789012345678901234567890123456789012345678901 \
|
||||
blowfish-cbc:01234567890123456789012345678901234567890123456789012345 \
|
||||
cast128-cbc:0123456789012345 \
|
||||
rijndael-cbc:0123456789012345 \
|
||||
rijndael-cbc:012345678901234567890123 \
|
||||
rijndael-cbc:01234567890123456789012345678901; do
|
||||
|
||||
ealgo=${ecipher%%:*}
|
||||
ekey=${ecipher##*:}
|
||||
|
||||
for acipher in \
|
||||
hmac-md5:0123456789012345 \
|
||||
hmac-sha1:01234567890123456789 \
|
||||
hmac-ripemd160:01234567890123456789 \
|
||||
hmac-sha2-256:01234567890123456789012345678901 \
|
||||
hmac-sha2-384:012345678901234567890123456789012345678901234567 \
|
||||
hmac-sha2-512:0123456789012345678901234567890123456789012345678901234567890123; do
|
||||
|
||||
aalgo=${acipher%%:*}
|
||||
akey=${acipher##*:}
|
||||
|
||||
setkey -F
|
||||
setkey -FP
|
||||
|
||||
(echo "add ${ipbase}.0.1 ${ipbase}.1.1 esp $spi -m transport -E $ealgo \"${ekey}\" -A $aalgo \"${akey}\" ;"
|
||||
echo "add ${ipbase}.1.1 ${ipbase}.0.1 esp `expr $spi + 1` -m transport -E $ealgo \"${ekey}\" -A $aalgo \"${akey}\" ;"
|
||||
|
||||
echo "spdadd ${ipbase}.0.1 ${ipbase}.1.1 any -P out ipsec esp/transport//require;"
|
||||
echo "spdadd ${ipbase}.1.1 ${ipbase}.0.1 any -P in ipsec esp/transport//require;"
|
||||
echo "spdadd ${ipbase}.0.1 ${ipbase}.1.1 any -P in ipsec esp/transport//require;"
|
||||
echo "spdadd ${ipbase}.1.1 ${ipbase}.0.1 any -P out ipsec esp/transport//require;"
|
||||
) | setkey -c >/dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "ok $i - setkey ${ealgo} ${ekey} ${aalgo} ${akey}"
|
||||
else
|
||||
echo "not ok $i - setkey ${ealgo} ${ekey} ${aalgo} ${akey}"
|
||||
fi
|
||||
i=$((i+1))
|
||||
|
||||
ping -c 1 -t 2 -S ${ipbase}.0.1 ${ipbase}.1.1 >/dev/null
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "ok $i - test 1 ${ealgo} ${ekey} ${aalgo} ${akey}"
|
||||
else
|
||||
echo "not ok $i - test 1 ${ealgo} ${ekey} ${aalgo} ${akey}"
|
||||
fi
|
||||
i=$((i+1))
|
||||
ping -c 1 -t 2 -S ${ipbase}.1.1 ${ipbase}.0.1 >/dev/null
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "ok $i - test 2 ${ealgo} ${ekey} ${aalgo} ${akey}"
|
||||
else
|
||||
echo "not ok $i - test 2 ${ealgo} ${ekey} ${aalgo} ${akey}"
|
||||
fi
|
||||
i=$((i+1))
|
||||
done
|
||||
done
|
||||
|
||||
setkey -F
|
||||
setkey -FP
|
||||
|
||||
ifconfig $netif -alias ${ipbase}.0.1
|
||||
ifconfig $netif -alias ${ipbase}.1.1
|
Loading…
Reference in New Issue
Block a user