mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chris Wright <chrisw@osdl.org>
To: akpm@osdl.org, torvalds@osdl.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 3/3][LSM] Lindent security/security.c
Date: Thu, 21 Oct 2004 18:07:24 -0700	[thread overview]
Message-ID: <20041021180723.J2357@build.pdx.osdl.net> (raw)
In-Reply-To: <20041021180451.I2357@build.pdx.osdl.net>; from chrisw@osdl.org on Thu, Oct 21, 2004 at 06:04:51PM -0700

Lindent security/security.c.

Signed-off-by: Chris Wright <chrisw@osdl.org>

 security.c |   58 +++++++++++++++++++++++++++++-----------------------------
 1 files changed, 29 insertions(+), 29 deletions(-)

--- linus-2.6/security/security.c~Lindent	2004-10-21 17:16:31.167148568 -0700
+++ linus-2.6/security/security.c	2004-10-21 17:16:46.739781168 -0700
@@ -22,16 +22,16 @@
 
 /* things that live in dummy.c */
 extern struct security_operations dummy_security_ops;
-extern void security_fixup_ops (struct security_operations *ops);
+extern void security_fixup_ops(struct security_operations *ops);
 
 struct security_operations *security_ops;	/* Initialized to NULL */
 
-static inline int verify (struct security_operations *ops)
+static inline int verify(struct security_operations *ops)
 {
 	/* verify the security_operations structure exists */
 	if (!ops)
 		return -EINVAL;
-	security_fixup_ops (ops);
+	security_fixup_ops(ops);
 	return 0;
 }
 
@@ -40,7 +40,7 @@
 	initcall_t *call;
 	call = &__security_initcall_start;
 	while (call < &__security_initcall_end) {
-		(*call)();
+		(*call) ();
 		call++;
 	}
 }
@@ -52,12 +52,12 @@
  */
 int __init security_init(void)
 {
-	printk (KERN_INFO "Security Framework v" SECURITY_FRAMEWORK_VERSION
-		" initialized\n");
+	printk(KERN_INFO "Security Framework v" SECURITY_FRAMEWORK_VERSION
+	       " initialized\n");
 
-	if (verify (&dummy_security_ops)) {
-		printk (KERN_ERR "%s could not verify "
-			"dummy_security_ops structure.\n", __FUNCTION__);
+	if (verify(&dummy_security_ops)) {
+		printk(KERN_ERR "%s could not verify "
+		       "dummy_security_ops structure.\n", __FUNCTION__);
 		return -EIO;
 	}
 
@@ -79,11 +79,11 @@
  * If there is already a security module registered with the kernel,
  * an error will be returned.  Otherwise 0 is returned on success.
  */
-int register_security (struct security_operations *ops)
+int register_security(struct security_operations *ops)
 {
-	if (verify (ops)) {
+	if (verify(ops)) {
 		printk(KERN_DEBUG "%s could not verify "
-			"security_operations structure.\n", __FUNCTION__);
+		       "security_operations structure.\n", __FUNCTION__);
 		return -EINVAL;
 	}
 
@@ -106,12 +106,12 @@
  * an error is returned.  Otherwise the default security options is set to the
  * the dummy_security_ops structure, and 0 is returned.
  */
-int unregister_security (struct security_operations *ops)
+int unregister_security(struct security_operations *ops)
 {
 	if (ops != security_ops) {
-		printk (KERN_INFO "%s: trying to unregister "
-			"a security_opts structure that is not "
-			"registered, failing.\n", __FUNCTION__);
+		printk(KERN_INFO "%s: trying to unregister "
+		       "a security_opts structure that is not "
+		       "registered, failing.\n", __FUNCTION__);
 		return -EINVAL;
 	}
 
@@ -132,21 +132,21 @@
  * The return value depends on the currently loaded security module, with 0 as
  * success.
  */
-int mod_reg_security (const char *name, struct security_operations *ops)
+int mod_reg_security(const char *name, struct security_operations *ops)
 {
-	if (verify (ops)) {
-		printk (KERN_INFO "%s could not verify "
-			"security operations.\n", __FUNCTION__);
+	if (verify(ops)) {
+		printk(KERN_INFO "%s could not verify "
+		       "security operations.\n", __FUNCTION__);
 		return -EINVAL;
 	}
 
 	if (ops == security_ops) {
-		printk (KERN_INFO "%s security operations "
-			"already registered.\n", __FUNCTION__);
+		printk(KERN_INFO "%s security operations "
+		       "already registered.\n", __FUNCTION__);
 		return -EINVAL;
 	}
 
-	return security_ops->register_security (name, ops);
+	return security_ops->register_security(name, ops);
 }
 
 /**
@@ -162,15 +162,15 @@
  * The return value depends on the currently loaded security module, with 0 as
  * success.
  */
-int mod_unreg_security (const char *name, struct security_operations *ops)
+int mod_unreg_security(const char *name, struct security_operations *ops)
 {
 	if (ops == security_ops) {
-		printk (KERN_INFO "%s invalid attempt to unregister "
-			" primary security ops.\n", __FUNCTION__);
+		printk(KERN_INFO "%s invalid attempt to unregister "
+		       " primary security ops.\n", __FUNCTION__);
 		return -EINVAL;
 	}
 
-	return security_ops->unregister_security (name, ops);
+	return security_ops->unregister_security(name, ops);
 }
 
 /**
@@ -183,9 +183,9 @@
  * This allows the security module to implement the capable function call
  * however it chooses to.
  */
-int capable (int cap)
+int capable(int cap)
 {
-	if (security_ops->capable (current, cap)) {
+	if (security_ops->capable(current, cap)) {
 		/* capability denied */
 		return 0;
 	}

      reply	other threads:[~2004-10-22  1:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-22  1:03 [PATCH 1/3][LSM] rename security_scaffolding_startup to security_init Chris Wright
2004-10-22  1:04 ` [PATCH 2/3][LSM] reduce noise during security_register Chris Wright
2004-10-22  1:07   ` Chris Wright [this message]

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=20041021180723.J2357@build.pdx.osdl.net \
    --to=chrisw@osdl.org \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.org \
    /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

all inboxes | Powered by JetHome®