Lines Matching refs:keyring
223 struct key *keyring; in install_thread_keyring_to_cred() local
228 keyring = keyring_alloc("_tid", new->uid, new->gid, new, in install_thread_keyring_to_cred()
232 if (IS_ERR(keyring)) in install_thread_keyring_to_cred()
233 return PTR_ERR(keyring); in install_thread_keyring_to_cred()
235 new->thread_keyring = keyring; in install_thread_keyring_to_cred()
270 struct key *keyring; in install_process_keyring_to_cred() local
275 keyring = keyring_alloc("_pid", new->uid, new->gid, new, in install_process_keyring_to_cred()
279 if (IS_ERR(keyring)) in install_process_keyring_to_cred()
280 return PTR_ERR(keyring); in install_process_keyring_to_cred()
282 new->process_keyring = keyring; in install_process_keyring_to_cred()
317 int install_session_keyring_to_cred(struct cred *cred, struct key *keyring) in install_session_keyring_to_cred() argument
325 if (!keyring) { in install_session_keyring_to_cred()
330 keyring = keyring_alloc("_ses", cred->uid, cred->gid, cred, in install_session_keyring_to_cred()
333 if (IS_ERR(keyring)) in install_session_keyring_to_cred()
334 return PTR_ERR(keyring); in install_session_keyring_to_cred()
336 __key_get(keyring); in install_session_keyring_to_cred()
341 cred->session_keyring = keyring; in install_session_keyring_to_cred()
356 static int install_session_keyring(struct key *keyring) in install_session_keyring() argument
365 ret = install_session_keyring_to_cred(new, keyring); in install_session_keyring()
841 struct key *keyring; in join_session_keyring() local
866 keyring = find_keyring_by_name(name, false); in join_session_keyring()
867 if (PTR_ERR(keyring) == -ENOKEY) { in join_session_keyring()
869 keyring = keyring_alloc( in join_session_keyring()
873 if (IS_ERR(keyring)) { in join_session_keyring()
874 ret = PTR_ERR(keyring); in join_session_keyring()
877 } else if (IS_ERR(keyring)) { in join_session_keyring()
878 ret = PTR_ERR(keyring); in join_session_keyring()
880 } else if (keyring == new->session_keyring) { in join_session_keyring()
886 ret = install_session_keyring_to_cred(new, keyring); in join_session_keyring()
893 ret = keyring->serial; in join_session_keyring()
894 key_put(keyring); in join_session_keyring()
899 key_put(keyring); in join_session_keyring()