diff options
Diffstat (limited to 'security/keys/process_keys.c')
-rw-r--r-- | security/keys/process_keys.c | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/security/keys/process_keys.c b/security/keys/process_keys.c index df329f684a65..2f5d89e92b85 100644 --- a/security/keys/process_keys.c +++ b/security/keys/process_keys.c | |||
@@ -276,48 +276,6 @@ static int install_session_keyring(struct key *keyring) | |||
276 | 276 | ||
277 | /*****************************************************************************/ | 277 | /*****************************************************************************/ |
278 | /* | 278 | /* |
279 | * deal with execve() | ||
280 | */ | ||
281 | int exec_keys(struct task_struct *tsk) | ||
282 | { | ||
283 | struct thread_group_cred *tgcred = NULL; | ||
284 | struct cred *new; | ||
285 | |||
286 | #ifdef CONFIG_KEYS | ||
287 | tgcred = kmalloc(sizeof(*tgcred), GFP_KERNEL); | ||
288 | if (!tgcred) | ||
289 | return -ENOMEM; | ||
290 | #endif | ||
291 | |||
292 | new = prepare_creds(); | ||
293 | if (new < 0) | ||
294 | return -ENOMEM; | ||
295 | |||
296 | /* newly exec'd tasks don't get a thread keyring */ | ||
297 | key_put(new->thread_keyring); | ||
298 | new->thread_keyring = NULL; | ||
299 | |||
300 | /* create a new per-thread-group creds for all this set of threads to | ||
301 | * share */ | ||
302 | memcpy(tgcred, new->tgcred, sizeof(struct thread_group_cred)); | ||
303 | |||
304 | atomic_set(&tgcred->usage, 1); | ||
305 | spin_lock_init(&tgcred->lock); | ||
306 | |||
307 | /* inherit the session keyring; new process keyring */ | ||
308 | key_get(tgcred->session_keyring); | ||
309 | tgcred->process_keyring = NULL; | ||
310 | |||
311 | release_tgcred(new); | ||
312 | new->tgcred = tgcred; | ||
313 | |||
314 | commit_creds(new); | ||
315 | return 0; | ||
316 | |||
317 | } /* end exec_keys() */ | ||
318 | |||
319 | /*****************************************************************************/ | ||
320 | /* | ||
321 | * the filesystem user ID changed | 279 | * the filesystem user ID changed |
322 | */ | 280 | */ |
323 | void key_fsuid_changed(struct task_struct *tsk) | 281 | void key_fsuid_changed(struct task_struct *tsk) |