[PATCH] cleanup: correct tabbing of check_kill_permission()

From: Andrew G. Morgan
Date: Sat Mar 01 2008 - 17:33:24 EST


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Andrew

Here is a small patch to reformat the check_kill_permission() function.
It doesn't change any functionality.

There was something confusing about its tabbing previously, and it also
ran over the 80 column limit.

Cheers

Andrew
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFHydmF+bHCR3gb8jsRAmehAKDVnrOMVkHPhZslnhE1tVVXl2x07gCgsAse
LdjzfIwC+dmOqfDGLwnhaOo=
=pQEM
-----END PGP SIGNATURE-----
From 7dda0a7adb7ab870e01f93b6b066598665e15f7d Mon Sep 17 00:00:00 2001
From: Andrew G. Morgan <morgan@xxxxxxxxxx>
Date: Mon, 25 Feb 2008 21:49:22 -0800
Subject: [PATCH] Reformat check_kill_permission() function to make it readable.

Signed-off-by: Andrew G. Morgan <morgan@xxxxxxxxxx>
---
kernel/signal.c | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/kernel/signal.c b/kernel/signal.c
index 84917fe..77f0439 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -530,17 +530,19 @@ static int check_kill_permission(int sig, struct siginfo *info,
if (!valid_signal(sig))
return error;

- if (info == SEND_SIG_NOINFO || (!is_si_special(info) && SI_FROMUSER(info))) {
- error = audit_signal_info(sig, t); /* Let audit system see the signal */
+ if (info == SEND_SIG_NOINFO
+ || (!is_si_special(info) && SI_FROMUSER(info))) {
+ /* Let audit system see the signal */
+ error = audit_signal_info(sig, t);
if (error)
return error;
error = -EPERM;
- if (((sig != SIGCONT) ||
- (task_session_nr(current) != task_session_nr(t)))
+ if (((sig != SIGCONT)
+ || (task_session_nr(current) != task_session_nr(t)))
&& (current->euid ^ t->suid) && (current->euid ^ t->uid)
&& (current->uid ^ t->suid) && (current->uid ^ t->uid)
&& !capable(CAP_KILL))
- return error;
+ return error;
}

return security_task_kill(t, info, sig, 0);
--
1.5.3.7