Initial Commit
- initial default booting image
This commit is contained in:
24
package/audit/Config.in
Normal file
24
package/audit/Config.in
Normal file
@@ -0,0 +1,24 @@
|
||||
# audit has some builtin per-architecture system call tables
|
||||
config BR2_PACKAGE_AUDIT_ARCH_SUPPORTS
|
||||
bool
|
||||
default y if BR2_aarch64 || BR2_arm || BR2_armeb || \
|
||||
BR2_i386 || BR2_powerpc || BR2_powerpc64 || \
|
||||
BR2_x86_64
|
||||
|
||||
config BR2_PACKAGE_AUDIT
|
||||
bool "audit"
|
||||
depends on BR2_PACKAGE_AUDIT_ARCH_SUPPORTS
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS
|
||||
depends on !BR2_STATIC_LIBS
|
||||
help
|
||||
The audit package contains the user space utilities for
|
||||
storing and searching the audit records generated by
|
||||
the audit subsystem in the Linux 2.6 kernel
|
||||
|
||||
Note: The z/OS remote plugin is disabled in this package
|
||||
|
||||
https://people.redhat.com/sgrubb/audit/
|
||||
|
||||
comment "audit needs a toolchain w/ threads, dynamic library"
|
||||
depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS
|
||||
depends on BR2_PACKAGE_AUDIT_ARCH_SUPPORTS
|
||||
102
package/audit/S02auditd
Normal file
102
package/audit/S02auditd
Normal file
@@ -0,0 +1,102 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# auditd This starts and stops auditd
|
||||
#
|
||||
# description: This starts the Linux Auditing System Daemon,
|
||||
# which collects security related events in a dedicated
|
||||
# audit log. If this daemon is turned off, audit events
|
||||
# will be sent to syslog.
|
||||
#
|
||||
|
||||
DAEMON="auditd"
|
||||
PIDFILE="/var/run/${DAEMON}.pid"
|
||||
|
||||
start(){
|
||||
printf "Starting %s: " "${DAEMON}"
|
||||
|
||||
# Create dir to store log files in if one doesn't exist. Create
|
||||
# the directory with SELinux permissions if possible
|
||||
if command -v selabel_lookup >/dev/null 2>&1; then
|
||||
audit_log_selable="$(selabel_lookup -b file -k /var/log/audit | cut -d ' ' -f 3)"
|
||||
mkdir -p --context="${audit_log_selable}" /var/log/audit
|
||||
else
|
||||
mkdir -p /var/log/audit
|
||||
fi
|
||||
|
||||
start-stop-daemon --start --pidfile "${PIDFILE}" \
|
||||
--exec "/usr/sbin/${DAEMON}"
|
||||
status=$?
|
||||
if [ "${status}" -eq 0 ]; then
|
||||
# Load the default rules
|
||||
test -f /etc/audit/audit.rules && /usr/sbin/auditctl -R /etc/audit/audit.rules >/dev/null
|
||||
echo "OK"
|
||||
else
|
||||
echo "FAIL"
|
||||
fi
|
||||
return "${status}"
|
||||
}
|
||||
|
||||
stop(){
|
||||
printf "Stopping %s: " "${DAEMON}"
|
||||
start-stop-daemon --stop --pidfile "${PIDFILE}" --exec "/usr/sbin/${DAEMON}"
|
||||
status=$?
|
||||
if [ "${status}" -eq 0 ]; then
|
||||
echo "OK"
|
||||
else
|
||||
echo "FAIL"
|
||||
return "${status}"
|
||||
fi
|
||||
while start-stop-daemon --stop --test --quiet --pidfile "${PIDFILE}" \
|
||||
--exec "/sbin/${DAEMON}"; do
|
||||
sleep 0.1
|
||||
done
|
||||
rm -f "${PIDFILE}"
|
||||
return "${status}"
|
||||
}
|
||||
|
||||
reload(){
|
||||
printf "Reloading %s configuration: " "${DAEMON}"
|
||||
start-stop-daemon --stop --signal HUP --pidfile "${PIDFILE}" 1>/dev/null
|
||||
status=$?
|
||||
if [ "${status}" -eq 0 ]; then
|
||||
echo "OK"
|
||||
else
|
||||
echo "FAIL"
|
||||
fi
|
||||
return "${status}"
|
||||
}
|
||||
|
||||
rotate(){
|
||||
printf "Rotating %s logs: " "${DAEMON}"
|
||||
start-stop-daemon --stop --signal SIGUSR1 --pidfile "${PIDFILE}" 1>/dev/null
|
||||
status=$?
|
||||
if [ "${status}" -eq 0 ]; then
|
||||
echo "OK"
|
||||
else
|
||||
echo "FAIL"
|
||||
fi
|
||||
return "${status}"
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
restart)
|
||||
stop
|
||||
start
|
||||
;;
|
||||
reload)
|
||||
reload
|
||||
;;
|
||||
rotate)
|
||||
rotate
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart|reload|rotate}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
4
package/audit/audit.hash
Normal file
4
package/audit/audit.hash
Normal file
@@ -0,0 +1,4 @@
|
||||
#Locally computed
|
||||
sha256 660213bac2baebabfc32be4d84a4aeb94effbd3e076b1014b78678b4502cf6ba audit-3.1.5.tar.gz
|
||||
sha256 32b1062f7da84967e7019d01ab805935caa7ab7321a7ced0e30ebe75e5df1670 COPYING
|
||||
sha256 f18a0811fa0e220ccbc42f661545e77f0388631e209585ed582a1c693029c6aa COPYING.LIB
|
||||
76
package/audit/audit.mk
Normal file
76
package/audit/audit.mk
Normal file
@@ -0,0 +1,76 @@
|
||||
################################################################################
|
||||
#
|
||||
# audit
|
||||
#
|
||||
################################################################################
|
||||
|
||||
AUDIT_VERSION = 3.1.5
|
||||
AUDIT_SITE = https://people.redhat.com/sgrubb/audit
|
||||
AUDIT_LICENSE = GPL-2.0+ (programs), LGPL-2.1+ (libraries)
|
||||
AUDIT_LICENSE_FILES = COPYING COPYING.LIB
|
||||
AUDIT_CPE_ID_VENDOR = linux_audit_project
|
||||
AUDIT_CPE_ID_PRODUCT = linux_audit
|
||||
|
||||
AUDIT_INSTALL_STAGING = YES
|
||||
|
||||
AUDIT_CONF_OPTS = --without-python --without-python3 --disable-zos-remote
|
||||
|
||||
# src/libev has some assembly function that is not present in Thumb mode:
|
||||
# Error: selected processor does not support `mcr p15,0,r3,c7,c10,5' in Thumb mode
|
||||
# so, we deactivate Thumb mode
|
||||
ifeq ($(BR2_ARM_INSTRUCTIONS_THUMB),y)
|
||||
AUDIT_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -marm"
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBCAP_NG),y)
|
||||
AUDIT_DEPENDENCIES += libcap-ng
|
||||
AUDIT_CONF_OPTS += --with-libcap-ng=yes
|
||||
else
|
||||
AUDIT_CONF_OPTS += --with-libcap-ng=no
|
||||
endif
|
||||
|
||||
# For i386, x86-64 and PowerPC, the system call tables are
|
||||
# unconditionally included. However, for ARM(eb) and AArch64, then
|
||||
# need to be explicitly enabled.
|
||||
|
||||
ifeq ($(BR2_arm)$(BR2_armeb),y)
|
||||
AUDIT_CONF_OPTS += --with-arm
|
||||
endif
|
||||
ifeq ($(BR2_aarch64),y)
|
||||
AUDIT_CONF_OPTS += --with-aarch64
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_INIT_SYSTEMD),y)
|
||||
AUDIT_CONF_OPTS += --enable-systemd
|
||||
else
|
||||
AUDIT_CONF_OPTS += --disable-systemd
|
||||
endif
|
||||
|
||||
define AUDIT_INSTALL_INIT_SYSV
|
||||
$(INSTALL) -D -m 755 package/audit/S02auditd $(TARGET_DIR)/etc/init.d/S02auditd
|
||||
endef
|
||||
|
||||
define AUDIT_INSTALL_INIT_SYSTEMD
|
||||
$(INSTALL) -D -m 644 package/audit/audit_tmpfiles.conf \
|
||||
$(TARGET_DIR)/usr/lib/tmpfiles.d/audit.conf
|
||||
endef
|
||||
|
||||
define AUDIT_INSTALL_CLEANUP
|
||||
$(RM) $(TARGET_DIR)/etc/rc.d/init.d/auditd
|
||||
$(RM) $(TARGET_DIR)/etc/sysconfig/auditd
|
||||
endef
|
||||
AUDIT_POST_INSTALL_TARGET_HOOKS += AUDIT_INSTALL_CLEANUP
|
||||
|
||||
define AUDIT_LINUX_CONFIG_FIXUPS
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_NET)
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_AUDIT)
|
||||
endef
|
||||
|
||||
HOST_AUDIT_CONF_OPTS = \
|
||||
--without-python \
|
||||
--without-python3 \
|
||||
--disable-zos-remote \
|
||||
--without-libcap-ng
|
||||
|
||||
$(eval $(autotools-package))
|
||||
$(eval $(host-autotools-package))
|
||||
1
package/audit/audit_tmpfiles.conf
Normal file
1
package/audit/audit_tmpfiles.conf
Normal file
@@ -0,0 +1 @@
|
||||
d /var/log/audit 0755 - -
|
||||
Reference in New Issue
Block a user