From: eparis@redhat.com
To: linux-kernel@vger.kernel.org
Cc: jmorris@namei.org, serue@us.ibm.com, Eric Paris <eparis@redhat.com>
Subject: [PATCH 3/4] capability: kernel/capability.c whitespace, syntax, and other cleanups
Date: Wed, 23 Apr 2008 13:52:33 -0400 [thread overview]
Message-ID: <12089731553073-git-send-email-eparis@redhat.com> (raw)
In-Reply-To: <12089731553297-git-send-email-eparis@redhat.com>
From: Eric Paris <eparis@redhat.com>
This patch changes kernel/capability.c to fix whitespace and syntax issues. Things that
are fixed may include (does not not have to include)
whitespace at end of lines
spaces followed by tabs
spaces used instead of tabs
spacing around parenthesis
location of { around structs and else clauses
location of * in pointer declarations
removal of initialization of static data to keep it in the right section
useless {} in if statemetns
useless checking for NULL before kfree
fixing of the indentation depth of switch statements
no assignments in if statements
include spaces around , in function calls
and any number of other things I forgot to mention
Signed-off-by: Eric Paris <eparis@redhat.com>
---
kernel/capability.c | 44 ++++++++++++++++++++++----------------------
1 files changed, 22 insertions(+), 22 deletions(-)
diff --git a/kernel/capability.c b/kernel/capability.c
index 39e8193..0185d10 100644
--- a/kernel/capability.c
+++ b/kernel/capability.c
@@ -161,8 +161,8 @@ out:
* group. We call this holding task_capability_lock and tasklist_lock.
*/
static inline int cap_set_pg(int pgrp_nr, kernel_cap_t *effective,
- kernel_cap_t *inheritable,
- kernel_cap_t *permitted)
+ kernel_cap_t *inheritable,
+ kernel_cap_t *permitted)
{
struct task_struct *g, *target;
int ret = -EPERM;
@@ -195,27 +195,27 @@ static inline int cap_set_pg(int pgrp_nr, kernel_cap_t *effective,
* and self. We call this holding task_capability_lock and tasklist_lock.
*/
static inline int cap_set_all(kernel_cap_t *effective,
- kernel_cap_t *inheritable,
- kernel_cap_t *permitted)
+ kernel_cap_t *inheritable,
+ kernel_cap_t *permitted)
{
- struct task_struct *g, *target;
- int ret = -EPERM;
- int found = 0;
-
- do_each_thread(g, target) {
- if (target == current || is_container_init(target->group_leader))
- continue;
- found = 1;
- if (security_capset_check(target, effective, inheritable,
- permitted))
- continue;
- ret = 0;
- security_capset_set(target, effective, inheritable, permitted);
- } while_each_thread(g, target);
-
- if (!found)
- ret = 0;
- return ret;
+ struct task_struct *g, *target;
+ int ret = -EPERM;
+ int found = 0;
+
+ do_each_thread(g, target) {
+ if (target == current || is_container_init(target->group_leader))
+ continue;
+ found = 1;
+ if (security_capset_check(target, effective, inheritable,
+ permitted))
+ continue;
+ ret = 0;
+ security_capset_set(target, effective, inheritable, permitted);
+ } while_each_thread(g, target);
+
+ if (!found)
+ ret = 0;
+ return ret;
}
/**
--
1.5.2.1
next prev parent reply other threads:[~2008-04-23 18:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-23 17:52 [PATCH 1/4] capability: capability.h whitespace, syntax, and other cleanups eparis
2008-04-23 17:52 ` [PATCH 2/4] capability: security/capability.c " eparis
2008-04-23 17:52 ` eparis [this message]
2008-04-23 17:52 ` [PATCH 4/4] capability: commoncap.c " eparis
2008-04-24 1:54 ` [PATCH 1/4] capability: capability.h " Serge E. Hallyn
2008-04-24 12:13 ` Eric Paris
2008-04-24 12:26 ` Serge E. Hallyn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=12089731553073-git-send-email-eparis@redhat.com \
--to=eparis@redhat.com \
--cc=jmorris@namei.org \
--cc=linux-kernel@vger.kernel.org \
--cc=serue@us.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox