Skip to content

Commit

Permalink
Add audit.m4 file to aid adding support to other projects
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.fedorahosted.org/svn/audit/trunk@1131 03a675c2-f56d-4096-908f-63dba836b7e4
  • Loading branch information
sgrubb committed Oct 30, 2015
1 parent f70562b commit 921e77f
Show file tree
Hide file tree
Showing 7 changed files with 71 additions and 3 deletions.
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
2.4.5
- Fix auditd disk flushing for data and sync modes
- Fix auditctl to not show options not supported on older OS
- Add audit.m4 file to aid adding support to other projects

2.4.4
- Fix linked list correctness in ausearch/report
Expand Down
2 changes: 1 addition & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#

SUBDIRS = lib auparse src/mt src/libev src audisp tools bindings init.d \
docs
m4 docs
EXTRA_DIST = ChangeLog AUTHORS NEWS README INSTALL audit.spec \
COPYING COPYING.LIB \
contrib/capp.rules contrib/nispom.rules contrib/lspp.rules \
Expand Down
1 change: 0 additions & 1 deletion TODO
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ Things that need to be done:
2.4.5
* interpret contexts
* auditctl should ignore invalid arches for rules
* Add libaudit.m4 to make audit easier to include

2.5
* Add audit by process name support
Expand Down
1 change: 1 addition & 0 deletions audit.spec
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ fi
%{_includedir}/libaudit.h
%{_includedir}/auparse.h
%{_includedir}/auparse-defs.h
%{_datadir}/aclocal/audit.m4
%{_libdir}/pkgconfig/audit.pc
%{_libdir}/pkgconfig/auparse.pc
%{_mandir}/man3/*
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ AC_SUBST(LIBWRAP_LIBS)
AC_SUBST(LIBPRELUDE_CFLAGS)
AC_SUBST(LIBPRELUDE_LDFLAGS)

AC_OUTPUT(Makefile lib/Makefile lib/audit.pc lib/test/Makefile auparse/Makefile auparse/test/Makefile auparse/auparse.pc src/Makefile src/mt/Makefile src/libev/Makefile src/test/Makefile docs/Makefile init.d/Makefile audisp/Makefile audisp/plugins/Makefile audisp/plugins/builtins/Makefile audisp/plugins/prelude/Makefile audisp/plugins/remote/Makefile audisp/plugins/zos-remote/Makefile bindings/Makefile bindings/python/Makefile bindings/python/python2/Makefile bindings/python/python3/Makefile bindings/golang/Makefile bindings/swig/Makefile bindings/swig/src/Makefile bindings/swig/python/Makefile bindings/swig/python3/Makefile tools/Makefile tools/aulast/Makefile tools/aulastlog/Makefile tools/ausyscall/Makefile tools/auvirt/Makefile)
AC_OUTPUT(Makefile lib/Makefile lib/audit.pc lib/test/Makefile auparse/Makefile auparse/test/Makefile auparse/auparse.pc src/Makefile src/mt/Makefile src/libev/Makefile src/test/Makefile docs/Makefile init.d/Makefile audisp/Makefile audisp/plugins/Makefile audisp/plugins/builtins/Makefile audisp/plugins/prelude/Makefile audisp/plugins/remote/Makefile audisp/plugins/zos-remote/Makefile bindings/Makefile bindings/python/Makefile bindings/python/python2/Makefile bindings/python/python3/Makefile bindings/golang/Makefile bindings/swig/Makefile bindings/swig/src/Makefile bindings/swig/python/Makefile bindings/swig/python3/Makefile tools/Makefile tools/aulast/Makefile tools/aulastlog/Makefile tools/ausyscall/Makefile tools/auvirt/Makefile m4/Makefile)

echo .
echo "
Expand Down
27 changes: 27 additions & 0 deletions m4/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Makefile.am --
# Copyright 2015 Red Hat Inc., Durham, North Carolina.
# All Rights Reserved.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# Authors:
# Steve Grubb <[email protected]>
#

CONFIG_CLEAN_FILES = *.loT *.rej *.orig

m4datadir = $(datadir)/aclocal
dist_m4data_DATA = audit.m4

40 changes: 40 additions & 0 deletions m4/audit.m4
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# audit.m4 - Checks for the libaudit support
# Copyright (c) 2015 Steve Grubb [email protected]
#
AC_DEFUN([AUDIT_PATH],
[
AC_ARG_WITH(audit,
[ --with-audit=[auto/yes/no] Add audit support [default=auto]],,
with_audit=auto)
# Check for libaudit API
#
# libaudit detection
if test "x$with_audit" = xno ; then
have_audit=no;
else
# Start by checking for header file
AC_CHECK_HEADER(audit.h, audit_headers=yes, audit_headers=no)
# See if we have libaudit library
AC_CHECK_LIB(audit, audit_open,
AUDIT_LDADD=-laudit,)
# Check that results are usable
if test "x$with_audit" = xyes -a "x$AUDIT_LDADD" = x ; then
AC_MSG_ERROR(audit support was requested and the library was not found)
fi
if test "x$AUDIT_LDADD" != x -a "$audit_headers" = no ; then
AC_MSG_ERROR(audit libraries found but headers are missing)
fi
fi
AC_SUBST(AUDIT_LDADD)
AC_MSG_CHECKING(whether to use audit)
if test "x$AUDIT_LDADD" != x ; then
AC_DEFINE(HAVE_AUDIT,1,[audit support])
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
])

0 comments on commit 921e77f

Please sign in to comment.