Commit e54dc243 authored by Amy Griffis's avatar Amy Griffis Committed by Al Viro
Browse files

[PATCH] audit signal recipients



When auditing syscalls that send signals, log the pid and security
context for each target process. Optimize the data collection by
adding a counter for signal-related rules, and avoiding allocating an
aux struct unless we have more than one target process. For process
groups, collect pid/context data in blocks of 16. Move the
audit_signal_info() hook up in check_kill_permission() so we audit
attempts where permission is denied.

Signed-off-by: default avatarAmy Griffis <amy.griffis@hp.com>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 7f13da40
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -28,6 +28,15 @@ static unsigned signal_class[] = {
~0U
};

int audit_classify_arch(int arch)
{
#ifdef CONFIG_IA32_SUPPORT
	if (arch == AUDIT_ARCH_I386)
		return 1;
#endif
	return 0;
}

int audit_classify_syscall(int abi, unsigned syscall)
{
#ifdef CONFIG_IA32_SUPPORT
+9 −0
Original line number Diff line number Diff line
@@ -28,6 +28,15 @@ static unsigned signal_class[] = {
~0U
};

int audit_classify_arch(int arch)
{
#ifdef CONFIG_PPC64
	if (arch == AUDIT_ARCH_PPC)
		return 1;
#endif
	return 0;
}

int audit_classify_syscall(int abi, unsigned syscall)
{
#ifdef CONFIG_PPC64
+9 −0
Original line number Diff line number Diff line
@@ -28,6 +28,15 @@ static unsigned signal_class[] = {
~0U
};

int audit_classify_arch(int arch)
{
#ifdef CONFIG_COMPAT
	if (arch == AUDIT_ARCH_S390)
		return 1;
#endif
	return 0;
}

int audit_classify_syscall(int abi, unsigned syscall)
{
#ifdef CONFIG_COMPAT
+9 −0
Original line number Diff line number Diff line
@@ -28,6 +28,15 @@ static unsigned signal_class[] = {
~0U
};

int audit_classify_arch(int arch)
{
#ifdef CONFIG_SPARC32_COMPAT
	if (arch == AUDIT_ARCH_SPARC)
		return 1;
#endif
	return 0;
}

int audit_classify_syscall(int abi, unsigned syscall)
{
#ifdef CONFIG_SPARC32_COMPAT
+9 −0
Original line number Diff line number Diff line
@@ -28,6 +28,15 @@ static unsigned signal_class[] = {
~0U
};

int audit_classify_arch(int arch)
{
#ifdef CONFIG_IA32_EMULATION
	if (arch == AUDIT_ARCH_I386)
		return 1;
#endif
	return 0;
}

int audit_classify_syscall(int abi, unsigned syscall)
{
#ifdef CONFIG_IA32_EMULATION
Loading