diff --git a/util/admin/audit/actions.py b/util/admin/audit/actions.py new file mode 100644 index 0000000000..8e43503567 --- /dev/null +++ b/util/admin/audit/actions.py @@ -0,0 +1,40 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +# +# Licensed under the GNU General Public License, version 3. +# See the file http://www.gnu.org/licenses/gpl.txt + +from pisi.actionsapi import autotools +from pisi.actionsapi import pisitools +from pisi.actionsapi import get + +def setup(): + autotools.autoreconf("-vif") + autotools.configure("--with-libcap-ng=yes \ + --enable-gssapi-krb5=no \ + --enable-systemd=no \ + --with-python=yes \ + --disable-static") + +def build(): + autotools.make() + +def check(): + autotools.make("-j1 check") + +def install(): + autotools.rawInstall('DESTDIR="%s"' % get.installDIR()) + + # remove RH specific bits + pisitools.removeDir("/etc/sysconfig") + pisitools.removeDir("/etc/rc.d") + + # Create data directories + pisitools.dodir("/var/log/audit") + pisitools.dodir("/var/spool/audit") + + # Disable zos-remote plugin to get rid of deps. like cyrus-sasl + pisitools.remove("/usr/share/man/man8/audispd-zos-remote.8") + pisitools.remove("/usr/share/man/man5/zos-remote.conf.5") + + pisitools.dodoc("AUTHORS", "ChangeLog", "THANKS", "TODO", "README", "COPYING") diff --git a/util/admin/audit/comar/package.py b/util/admin/audit/comar/package.py new file mode 100644 index 0000000000..9957f0d6c8 --- /dev/null +++ b/util/admin/audit/comar/package.py @@ -0,0 +1,9 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- + +import os + +def postInstall(fromVersion, fromRelease, toVersion, toRelease): + os.system("ln -s /usr/sbin/audispd /sbin/audispd") + os.system("ln -s /usr/sbin/auditd /sbin/auditd") + os.system("/bin/systemctl enable auditd.service") diff --git a/util/admin/audit/comar/service.py b/util/admin/audit/comar/service.py new file mode 100644 index 0000000000..d4738e8e27 --- /dev/null +++ b/util/admin/audit/comar/service.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +from comar.service import * + +serviceType = "server" +serviceDesc = _({"en": "AUDIT Daemon", + "tr": "AUDIT Servisi"}) +serviceDefault = "on" + +@synchronized +def start(): + reply = startService(command="/usr/sbin/auditd", + pidfile="/run/auditd.pid", + donotify=True) + if reply == 0: + run("/usr/sbin/auditctl -R /etc/audit/rules.d/audit.rules") + +@synchronized +def stop(): + stopService(pidfile="/run/auditd.pid", + donotify=True) + run("/usr/sbin/auditctl -D") + +def status(): + return isServiceRunning("/run/auditd.pid") diff --git a/util/admin/audit/files/without_openldap.patch b/util/admin/audit/files/without_openldap.patch new file mode 100644 index 0000000000..9f2c8591f5 --- /dev/null +++ b/util/admin/audit/files/without_openldap.patch @@ -0,0 +1,25 @@ +diff -Nuar audit-2.3.6.orig/audisp/plugins/Makefile.am audit-2.3.6/audisp/plugins/Makefile.am +--- audit-2.3.6.orig/audisp/plugins/Makefile.am 2014-04-11 22:49:23.000000000 +0300 ++++ audit-2.3.6/audisp/plugins/Makefile.am 2014-05-17 01:46:10.260461732 +0300 +@@ -22,7 +22,7 @@ + + CONFIG_CLEAN_FILES = *.loT *.rej *.orig + +-SUBDIRS = builtins zos-remote remote ++SUBDIRS = builtins remote + #SUBDIRS = builtins zos-remote + if HAVE_PRELUDE + SUBDIRS += prelude +diff -Nuar audit-2.3.6.orig/configure.ac audit-2.3.6/configure.ac +--- audit-2.3.6.orig/configure.ac 2014-04-11 22:49:33.000000000 +0300 ++++ audit-2.3.6/configure.ac 2014-05-17 01:44:36.753791021 +0300 +@@ -291,7 +291,7 @@ + AC_SUBST(LIBPRELUDE_CFLAGS) + AC_SUBST(LIBPRELUDE_LDFLAGS) + +-AC_OUTPUT(Makefile lib/Makefile lib/test/Makefile auparse/Makefile auparse/test/Makefile src/Makefile src/mt/Makefile src/libev/Makefile src/test/Makefile swig/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 tools/Makefile tools/aulast/Makefile tools/aulastlog/Makefile tools/ausyscall/Makefile tools/auvirt/Makefile) ++AC_OUTPUT(Makefile lib/Makefile lib/test/Makefile auparse/Makefile auparse/test/Makefile src/Makefile src/mt/Makefile src/libev/Makefile src/test/Makefile swig/Makefile docs/Makefile init.d/Makefile audisp/Makefile audisp/plugins/Makefile audisp/plugins/builtins/Makefile audisp/plugins/prelude/Makefile audisp/plugins/remote/Makefile bindings/Makefile bindings/python/Makefile tools/Makefile tools/aulast/Makefile tools/aulastlog/Makefile tools/ausyscall/Makefile tools/auvirt/Makefile) + + echo . + echo " + diff --git a/util/admin/audit/pspec.xml b/util/admin/audit/pspec.xml new file mode 100644 index 0000000000..8d82add29c --- /dev/null +++ b/util/admin/audit/pspec.xml @@ -0,0 +1,83 @@ + + + + + audit + http://people.redhat.com/sgrubb/audit/ + + PisiLinux Community + admins@pisilinux.org + + GPLv2+ + app:console + library + service + User space tools for kernel auditing + audit contains the user space utilities for storing and searching the audit records generated by the audit subsystem in the Linux 2.6 kernel. + http://people.redhat.com/sgrubb/audit/audit-2.3.7.tar.gz + + python-devel + kernel-headers + libcap-ng-devel + tcp-wrappers-devel + + + without_openldap.patch + + + + + audit + + libcap-ng + + + /etc + /usr/share/doc + /usr/lib + /usr/sbin + /usr/bin + /usr/share/man + /var/log/audit + /var/spool/audit + + + System.Service + System.Package + + + + + python-audit + Python bindings for audit + + audit + + + /usr/lib/python* + + + + + audit-devel + system.devel + Development files for audit + + audit + + + /usr/include + /usr/share/man/man3 + + + + + + 2016-03-21 + 2.3.7 + Version bump. + Serdar Soytetir + kaptan@pisilinux.org + + + diff --git a/util/admin/audit/translations.xml b/util/admin/audit/translations.xml new file mode 100644 index 0000000000..dbefa5418f --- /dev/null +++ b/util/admin/audit/translations.xml @@ -0,0 +1,18 @@ + + + + audit + Linux çekirdeğinin 2.6 sürümü için inceleme/denetleme araçları + audit Linux çekirdeğinin 2.6 sürümünün inceleme altyapısı tarafından üretilen inceleme kayıtlarını aramak ve saklamak için kullanılan araçları içerir. + + + + python-audit + audit için Python bağlayıcısı + + + + audit-devel + audit için geliştirme dosyaları + +