diff options
| author | James Morris <james.l.morris@oracle.com> | 2016-03-03 19:39:53 -0500 |
|---|---|---|
| committer | James Morris <james.l.morris@oracle.com> | 2016-03-03 19:39:53 -0500 |
| commit | 88a1b564a20e371e6be41b39b85673e9c1959491 (patch) | |
| tree | f70850f5242470d479711ddb816ac05f47b15642 /security/keys | |
| parent | 5804602536649bccc907cbdd7e31b8797bdb6c45 (diff) | |
| parent | 4e8ae72a75aae285ec5b93518b9680da198afd0d (diff) | |
Merge tag 'keys-next-20160303' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs into next
Diffstat (limited to 'security/keys')
| -rw-r--r-- | security/keys/big_key.c | 15 | ||||
| -rw-r--r-- | security/keys/key.c | 2 |
2 files changed, 3 insertions, 14 deletions
diff --git a/security/keys/big_key.c b/security/keys/big_key.c index 907c1522ee46..c721e398893a 100644 --- a/security/keys/big_key.c +++ b/security/keys/big_key.c | |||
| @@ -9,7 +9,6 @@ | |||
| 9 | * 2 of the Licence, or (at your option) any later version. | 9 | * 2 of the Licence, or (at your option) any later version. |
| 10 | */ | 10 | */ |
| 11 | 11 | ||
| 12 | #include <linux/module.h> | ||
| 13 | #include <linux/init.h> | 12 | #include <linux/init.h> |
| 14 | #include <linux/seq_file.h> | 13 | #include <linux/seq_file.h> |
| 15 | #include <linux/file.h> | 14 | #include <linux/file.h> |
| @@ -18,8 +17,6 @@ | |||
| 18 | #include <keys/user-type.h> | 17 | #include <keys/user-type.h> |
| 19 | #include <keys/big_key-type.h> | 18 | #include <keys/big_key-type.h> |
| 20 | 19 | ||
| 21 | MODULE_LICENSE("GPL"); | ||
| 22 | |||
| 23 | /* | 20 | /* |
| 24 | * Layout of key payload words. | 21 | * Layout of key payload words. |
| 25 | */ | 22 | */ |
| @@ -212,18 +209,8 @@ long big_key_read(const struct key *key, char __user *buffer, size_t buflen) | |||
| 212 | return ret; | 209 | return ret; |
| 213 | } | 210 | } |
| 214 | 211 | ||
| 215 | /* | ||
| 216 | * Module stuff | ||
| 217 | */ | ||
| 218 | static int __init big_key_init(void) | 212 | static int __init big_key_init(void) |
| 219 | { | 213 | { |
| 220 | return register_key_type(&key_type_big_key); | 214 | return register_key_type(&key_type_big_key); |
| 221 | } | 215 | } |
| 222 | 216 | device_initcall(big_key_init); | |
| 223 | static void __exit big_key_cleanup(void) | ||
| 224 | { | ||
| 225 | unregister_key_type(&key_type_big_key); | ||
| 226 | } | ||
| 227 | |||
| 228 | module_init(big_key_init); | ||
| 229 | module_exit(big_key_cleanup); | ||
diff --git a/security/keys/key.c b/security/keys/key.c index 09ef276c4bdc..b28755131687 100644 --- a/security/keys/key.c +++ b/security/keys/key.c | |||
| @@ -296,6 +296,8 @@ struct key *key_alloc(struct key_type *type, const char *desc, | |||
| 296 | key->flags |= 1 << KEY_FLAG_IN_QUOTA; | 296 | key->flags |= 1 << KEY_FLAG_IN_QUOTA; |
| 297 | if (flags & KEY_ALLOC_TRUSTED) | 297 | if (flags & KEY_ALLOC_TRUSTED) |
| 298 | key->flags |= 1 << KEY_FLAG_TRUSTED; | 298 | key->flags |= 1 << KEY_FLAG_TRUSTED; |
| 299 | if (flags & KEY_ALLOC_BUILT_IN) | ||
| 300 | key->flags |= 1 << KEY_FLAG_BUILTIN; | ||
| 299 | 301 | ||
| 300 | #ifdef KEY_DEBUGGING | 302 | #ifdef KEY_DEBUGGING |
| 301 | key->magic = KEY_DEBUG_MAGIC; | 303 | key->magic = KEY_DEBUG_MAGIC; |
