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 /fs/nfs/idmap.c | |
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 'fs/nfs/idmap.c')
-rw-r--r-- | fs/nfs/idmap.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/fs/nfs/idmap.c b/fs/nfs/idmap.c index 9cc4a3fbf4b0..bc3968fa81e5 100644 --- a/fs/nfs/idmap.c +++ b/fs/nfs/idmap.c | |||
@@ -193,19 +193,15 @@ static int nfs_idmap_init_keyring(void) | |||
193 | if (!cred) | 193 | if (!cred) |
194 | return -ENOMEM; | 194 | return -ENOMEM; |
195 | 195 | ||
196 | keyring = key_alloc(&key_type_keyring, ".id_resolver", 0, 0, cred, | 196 | keyring = keyring_alloc(".id_resolver", 0, 0, cred, |
197 | (KEY_POS_ALL & ~KEY_POS_SETATTR) | | 197 | (KEY_POS_ALL & ~KEY_POS_SETATTR) | |
198 | KEY_USR_VIEW | KEY_USR_READ, | 198 | KEY_USR_VIEW | KEY_USR_READ, |
199 | KEY_ALLOC_NOT_IN_QUOTA); | 199 | KEY_ALLOC_NOT_IN_QUOTA, NULL); |
200 | if (IS_ERR(keyring)) { | 200 | if (IS_ERR(keyring)) { |
201 | ret = PTR_ERR(keyring); | 201 | ret = PTR_ERR(keyring); |
202 | goto failed_put_cred; | 202 | goto failed_put_cred; |
203 | } | 203 | } |
204 | 204 | ||
205 | ret = key_instantiate_and_link(keyring, NULL, 0, NULL, NULL); | ||
206 | if (ret < 0) | ||
207 | goto failed_put_key; | ||
208 | |||
209 | ret = register_key_type(&key_type_id_resolver); | 205 | ret = register_key_type(&key_type_id_resolver); |
210 | if (ret < 0) | 206 | if (ret < 0) |
211 | goto failed_put_key; | 207 | goto failed_put_key; |