diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-16 18:40:50 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-16 18:40:50 -0500 |
commit | 2a74dbb9a86e8102dcd07d284135b4530a84826e (patch) | |
tree | a54403e312b6062dfb57bd904ba8b8ce3b11e720 /net/dns_resolver | |
parent | 770b6cb4d21fb3e3df2a7a51e186a3c14db1ec30 (diff) | |
parent | e93072374112db9dc86635934ee761249be28370 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security
Pull security subsystem updates from James Morris:
"A quiet cycle for the security subsystem with just a few maintenance
updates."
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security:
Smack: create a sysfs mount point for smackfs
Smack: use select not depends in Kconfig
Yama: remove locking from delete path
Yama: add RCU to drop read locking
drivers/char/tpm: remove tasklet and cleanup
KEYS: Use keyring_alloc() to create special keyrings
KEYS: Reduce initial permissions on keys
KEYS: Make the session and process keyrings per-thread
seccomp: Make syscall skipping and nr changes more consistent
key: Fix resource leak
keys: Fix unreachable code
KEYS: Add payload preparsing opportunity prior to key instantiate or update
Diffstat (limited to 'net/dns_resolver')
-rw-r--r-- | net/dns_resolver/dns_key.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/net/dns_resolver/dns_key.c b/net/dns_resolver/dns_key.c index 8aa4b1115384..0a69d0757795 100644 --- a/net/dns_resolver/dns_key.c +++ b/net/dns_resolver/dns_key.c | |||
@@ -259,20 +259,16 @@ static int __init init_dns_resolver(void) | |||
259 | if (!cred) | 259 | if (!cred) |
260 | return -ENOMEM; | 260 | return -ENOMEM; |
261 | 261 | ||
262 | keyring = key_alloc(&key_type_keyring, ".dns_resolver", | 262 | keyring = keyring_alloc(".dns_resolver", |
263 | GLOBAL_ROOT_UID, GLOBAL_ROOT_GID, cred, | 263 | GLOBAL_ROOT_UID, GLOBAL_ROOT_GID, cred, |
264 | (KEY_POS_ALL & ~KEY_POS_SETATTR) | | 264 | (KEY_POS_ALL & ~KEY_POS_SETATTR) | |
265 | KEY_USR_VIEW | KEY_USR_READ, | 265 | KEY_USR_VIEW | KEY_USR_READ, |
266 | KEY_ALLOC_NOT_IN_QUOTA); | 266 | KEY_ALLOC_NOT_IN_QUOTA, NULL); |
267 | if (IS_ERR(keyring)) { | 267 | if (IS_ERR(keyring)) { |
268 | ret = PTR_ERR(keyring); | 268 | ret = PTR_ERR(keyring); |
269 | goto failed_put_cred; | 269 | goto failed_put_cred; |
270 | } | 270 | } |
271 | 271 | ||
272 | ret = key_instantiate_and_link(keyring, NULL, 0, NULL, NULL); | ||
273 | if (ret < 0) | ||
274 | goto failed_put_key; | ||
275 | |||
276 | ret = register_key_type(&key_type_dns_resolver); | 272 | ret = register_key_type(&key_type_dns_resolver); |
277 | if (ret < 0) | 273 | if (ret < 0) |
278 | goto failed_put_key; | 274 | goto failed_put_key; |
@@ -304,3 +300,4 @@ static void __exit exit_dns_resolver(void) | |||
304 | module_init(init_dns_resolver) | 300 | module_init(init_dns_resolver) |
305 | module_exit(exit_dns_resolver) | 301 | module_exit(exit_dns_resolver) |
306 | MODULE_LICENSE("GPL"); | 302 | MODULE_LICENSE("GPL"); |
303 | |||