KEYS: Do some style cleanup in the key management code.
Do a bit of a style clean up in the key management code. No functional
changes.
Done using:
perl -p -i -e 's!^/[*]*/\n!!' security/keys/*.c
perl -p -i -e 's!} /[*] end [a-z0-9_]*[(][)] [*]/\n!}\n!' security/keys/*.c
sed -i -s -e ": next" -e N -e 's/^\n[}]$/}/' -e t -e P -e 's/^.*\n//' -e "b next" security/keys/*.c
To remove /*****/ lines, remove comments on the closing brace of a
function to name the function and remove blank lines before the closing
brace of a function.
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
diff --git a/security/keys/request_key_auth.c b/security/keys/request_key_auth.c
index 8674715..ba717b8 100644
--- a/security/keys/request_key_auth.c
+++ b/security/keys/request_key_auth.c
@@ -38,7 +38,6 @@
.read = request_key_auth_read,
};
-/*****************************************************************************/
/*
* instantiate a request-key authorisation key
*/
@@ -48,10 +47,8 @@
{
key->payload.data = (struct request_key_auth *) data;
return 0;
+}
-} /* end request_key_auth_instantiate() */
-
-/*****************************************************************************/
/*
* reading a request-key authorisation key retrieves the callout information
*/
@@ -63,10 +60,8 @@
seq_puts(m, "key:");
seq_puts(m, key->description);
seq_printf(m, " pid:%d ci:%zu", rka->pid, rka->callout_len);
+}
-} /* end request_key_auth_describe() */
-
-/*****************************************************************************/
/*
* read the callout_info data
* - the key's semaphore is read-locked
@@ -91,10 +86,8 @@
}
return ret;
+}
-} /* end request_key_auth_read() */
-
-/*****************************************************************************/
/*
* handle revocation of an authorisation token key
* - called with the key sem write-locked
@@ -109,10 +102,8 @@
put_cred(rka->cred);
rka->cred = NULL;
}
+}
-} /* end request_key_auth_revoke() */
-
-/*****************************************************************************/
/*
* destroy an instantiation authorisation token key
*/
@@ -131,10 +122,8 @@
key_put(rka->dest_keyring);
kfree(rka->callout_info);
kfree(rka);
+}
-} /* end request_key_auth_destroy() */
-
-/*****************************************************************************/
/*
* create an authorisation token for /sbin/request-key or whoever to gain
* access to the caller's security data
@@ -228,10 +217,8 @@
kfree(rka);
kleave("= %d", ret);
return ERR_PTR(ret);
+}
-} /* end request_key_auth_new() */
-
-/*****************************************************************************/
/*
* see if an authorisation key is associated with a particular key
*/
@@ -242,10 +229,8 @@
key_serial_t id = (key_serial_t)(unsigned long) _id;
return rka->target_key->serial == id;
+}
-} /* end key_get_instantiation_authkey_match() */
-
-/*****************************************************************************/
/*
* get the authorisation key for instantiation of a specific key if attached to
* the current process's keyrings
@@ -278,5 +263,4 @@
error:
return authkey;
-
-} /* end key_get_instantiation_authkey() */
+}