[PATCH 07/07][RFC] RACF audit plugin - build and packaging integration

Klaus Heinrich Kiwi klausk at br.ibm.com
Fri Sep 28 20:43:34 UTC 2007


Klaus Heinrich Kiwi wrote:

> This patch adds the racf plugin to the audit package build system, with
> some additions to the spec file as well (the audit plugins package is
> still disabled).
> 
> Signed-off-by: Klaus Heinrich Kiwi <klausk at br.ibm.com>

Noted that there are some minor things out of place for this patch. 
Below is the same patch, fixed.

Signed-off-by: Klaus Heinrich Kiwi <klausk at br.ibm.com>

diff -purN audit-1.6.2/audisp/plugins/Makefile.am audit-1.6.2_racf2/audisp/plugins/Makefile.am
--- audit-1.6.2/audisp/plugins/Makefile.am      2007-09-12 14:25:13.000000000 -0300
+++ audit-1.6.2_racf2/audisp/plugins/Makefile.am        2007-09-28 09:37:07.000000000 -0300
@@ -22,5 +22,5 @@
 
 CONFIG_CLEAN_FILES = Makefile.in *.loT *.rej *.orig
 
-SUBDIRS = builtins ids remote
+SUBDIRS = builtins ids remote racf
 
diff -purN audit-1.6.2/audisp/plugins/racf/Makefile.am audit-1.6.2_racf2/audisp/plugins/racf/Makefile.am
--- audit-1.6.2/audisp/plugins/racf/Makefile.am 1969-12-31 21:00:00.000000000 -0300
+++ audit-1.6.2_racf2/audisp/plugins/racf/Makefile.am   2007-09-28 16:53:46.000000000 -0300
@@ -0,0 +1,46 @@
+# Makefile.am--
+# Copyright (C) 2007 International Business Machines  Corp.
+# All Rights Reserved.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program 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 General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+#
+# Authors:
+#   Klaus Heinrich Kiwi <klausk at br.ibm.com>
+#
+
+INCLUDES = -I.. -I${top_srcdir}/lib -I${top_srcdir}/auparse
+CONFIG_CLEAN_FILES = Makefile.in *.rej *.orig
+AUTOMAKE_OPTIONS = no-dependencies
+EXTRA_DIST = racf.conf audisp-racf.conf
+LIBS = -L${top_srcdir}/auparse -lauparse
+LDADD = -lpthread -lldap -llber 
+disp_confdir = $(sysconfdir)/audisp
+plugin_confdir=$(disp_confdir)/plugins.d
+racf_plugin_conf = racf.conf
+racf_disp_conf = audisp-racf.conf
+sbin_PROGRAMS = audisp-racf
+
+noinst_HEADERS = racf-log.h racf-ldap.h racf-config.h racf-queue.h
+audisp_racf_SOURCES = racf-plugin.c racf-log.c racf-ldap.c racf-config.c racf-queue.c
+audisp_racf_CFLAGS = -W -Wall -Wundef -D_GNU_SOURCE
+
+install-data-hook:
+       mkdir -p -m 0750 ${DESTDIR}${plugin_confdir}
+       $(INSTALL_DATA) -D -m 640 ${srcdir}/$(racf_plugin_conf) ${DESTDIR}${disp_confdir}
+       $(INSTALL_DATA) -D -m 640 ${srcdir}/$(racf_disp_conf) ${DESTDIR}${plugin_confdir}
+
+uninstall-hook:
+       rm ${DESTDIR}${plugin_confdir}/$(racf_disp_conf)
+       rm ${DESTDIR}${disp_confdir}/$(racf_plugin_conf)
diff -purN audit-1.6.2/audit.spec audit-1.6.2_racf2/audit.spec
--- audit-1.6.2/audit.spec      2007-09-25 08:46:49.000000000 -0300
+++ audit-1.6.2_racf2/audit.spec        2007-09-28 17:25:42.000000000 -0300
@@ -9,7 +9,7 @@ Group: System Environment/Daemons
 URL: http://people.redhat.com/sgrubb/audit/
 Source0: %{name}-%{version}.tar.gz
 BuildRoot: %{_tmppath}/%{name}-%{version}-root
-BuildRequires: gettext-devel intltool libtool swig python-devel
+BuildRequires: gettext-devel intltool libtool swig python-devel openldap-devel
 BuildRequires: kernel-headers >= 2.6.18
 BuildRequires: automake >= 1.9
 BuildRequires: autoconf >= 2.59
@@ -59,6 +59,7 @@ and libauparse can be used by python.
 ##Group: System Environment/Daemons
 ##Requires: %{name} = %{version}-%{release}
 ##Requires: %{name}-libs = %{version}-%{release}
+##Requires: openldap
 
 ##%description -n audispd-plugins
 ##The audispd-plugins package provides plugins for the real-time
@@ -124,7 +125,10 @@ touch -r ./audit.spec $RPM_BUILD_ROOT/et
 # Remove the plugin stuff for now
 rm -f $RPM_BUILD_ROOT/etc/audisp/plugins.d/au-ids.conf
 rm -f $RPM_BUILD_ROOT/etc/audisp/plugins.d/remote.conf
+rm -f $RPM_BUILD_ROOT/etc/audisp/plugins.d/audisp-racf.conf
+rm -f $RPM_BUILD_ROOT/etc/audisp/racf.conf
 rm -f $RPM_BUILD_ROOT/sbin/audisp-ids
+rm -f $RPM_BUILD_ROOT/sbin/audisp-racf
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -214,7 +218,10 @@ fi
 ##%defattr(-,root,root,-)
 ##%attr(640,root,root) /etc/audisp/plugins.d/au-ids.conf
 ##%attr(640,root,root) /etc/audisp/plugins.d/remote.conf
+##%config(noreplace) %attr(640,root,root) /etc/audisp/plugins.d/audisp-racf.conf
+##%config(noreplace) %attr(640,root,root) /etc/audisp/racf.conf
 ##%attr(750,root,root) /sbin/audisp-ids
+##%attr(750,root,root) /sbin/audisp-racf
 
 %files -n system-config-audit -f system-config-audit.lang
 %defattr(-,root,root,-)
diff -purN audit-1.6.2/configure.ac audit-1.6.2_racf2/configure.ac
--- audit-1.6.2/configure.ac    2007-09-12 14:26:41.000000000 -0300
+++ audit-1.6.2_racf2/configure.ac      2007-09-28 09:37:07.000000000 -0300
@@ -109,7 +109,7 @@ if test x$use_apparmor != xno ; then
       AC_DEFINE(WITH_APPARMOR,1,[Define if you want to enable AppArmor events.])fi
 
 AC_CONFIG_SUBDIRS([system-config-audit])
-AC_OUTPUT(Makefile lib/Makefile auparse/Makefile auparse/test/Makefile src/Makefile src/mt/Makefile swig/Makefile docs/Makefile init.d/Makefile audisp/Makefile audisp/plugins/Makefile audisp/plugins/builtins/Makefile audisp/plugins/ids/Makefile audisp/plugins/remote/Makefile bindings/Makefile bindings/python/Makefile)
+AC_OUTPUT(Makefile lib/Makefile auparse/Makefile auparse/test/Makefile src/Makefile src/mt/Makefile swig/Makefile docs/Makefile init.d/Makefile audisp/Makefile audisp/plugins/Makefile audisp/plugins/builtins/Makefile audisp/plugins/ids/Makefile audisp/plugins/remote/Makefile audisp/plugins/racf/Makefile bindings/Makefile bindings/python/Makefile)
 
 echo .
 echo "

-- 
.:klaus h kiwi <klausk at br.ibm.com>:.




More information about the Linux-audit mailing list