Skip to content

Commit

Permalink
pkcs7: Set the module licence to prevent tainting
Browse files Browse the repository at this point in the history
Set the module licence to prevent the kernel from being tainted if loaded
as a module.

Reported-by: Randy Dunlap <[email protected]>
Signed-off-by: David Howells <[email protected]>
  • Loading branch information
dhowells committed Nov 15, 2017
1 parent 0a9dd0e commit 1e684d3
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions crypto/asymmetric_keys/pkcs7_key_type.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("PKCS#7 testing key type");
MODULE_AUTHOR("Red Hat, Inc.");

static unsigned pkcs7_usage;
module_param_named(usage, pkcs7_usage, uint, S_IWUSR | S_IRUGO);
Expand Down
5 changes: 5 additions & 0 deletions crypto/asymmetric_keys/pkcs7_parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

#define pr_fmt(fmt) "PKCS7: "fmt
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/export.h>
#include <linux/slab.h>
#include <linux/err.h>
Expand All @@ -19,6 +20,10 @@
#include "pkcs7_parser.h"
#include "pkcs7-asn1.h"

MODULE_DESCRIPTION("PKCS#7 parser");
MODULE_AUTHOR("Red Hat, Inc.");
MODULE_LICENSE("GPL");

struct pkcs7_parse_context {
struct pkcs7_message *msg; /* Message being constructed */
struct pkcs7_signed_info *sinfo; /* SignedInfo being constructed */
Expand Down
2 changes: 2 additions & 0 deletions crypto/asymmetric_keys/public_key.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
#include <crypto/public_key.h>
#include <crypto/akcipher.h>

MODULE_DESCRIPTION("In-software asymmetric public-key subtype");
MODULE_AUTHOR("Red Hat, Inc.");
MODULE_LICENSE("GPL");

/*
Expand Down
1 change: 1 addition & 0 deletions crypto/asymmetric_keys/x509_public_key.c
Original file line number Diff line number Diff line change
Expand Up @@ -275,4 +275,5 @@ module_init(x509_key_init);
module_exit(x509_key_exit);

MODULE_DESCRIPTION("X.509 certificate parser");
MODULE_AUTHOR("Red Hat, Inc.");
MODULE_LICENSE("GPL");

0 comments on commit 1e684d3

Please sign in to comment.