Lines Matching full:new
221 int install_thread_keyring_to_cred(struct cred *new) in install_thread_keyring_to_cred() argument
225 if (new->thread_keyring) in install_thread_keyring_to_cred()
228 keyring = keyring_alloc("_tid", new->uid, new->gid, new, in install_thread_keyring_to_cred()
235 new->thread_keyring = keyring; in install_thread_keyring_to_cred()
246 struct cred *new; in install_thread_keyring() local
249 new = prepare_creds(); in install_thread_keyring()
250 if (!new) in install_thread_keyring()
253 ret = install_thread_keyring_to_cred(new); in install_thread_keyring()
255 abort_creds(new); in install_thread_keyring()
259 return commit_creds(new); in install_thread_keyring()
268 int install_process_keyring_to_cred(struct cred *new) in install_process_keyring_to_cred() argument
272 if (new->process_keyring) in install_process_keyring_to_cred()
275 keyring = keyring_alloc("_pid", new->uid, new->gid, new, in install_process_keyring_to_cred()
282 new->process_keyring = keyring; in install_process_keyring_to_cred()
293 struct cred *new; in install_process_keyring() local
296 new = prepare_creds(); in install_process_keyring()
297 if (!new) in install_process_keyring()
300 ret = install_process_keyring_to_cred(new); in install_process_keyring()
302 abort_creds(new); in install_process_keyring()
306 return commit_creds(new); in install_process_keyring()
312 * then install a new anonymous session keyring.
352 * install a new anonymous session keyring.
358 struct cred *new; in install_session_keyring() local
361 new = prepare_creds(); in install_session_keyring()
362 if (!new) in install_session_keyring()
365 ret = install_session_keyring_to_cred(new, keyring); in install_session_keyring()
367 abort_creds(new); in install_session_keyring()
371 return commit_creds(new); in install_session_keyring()
817 /* if we attempted to install a keyring, then it may have caused new in lookup_user_key()
827 * create a new one of that name and join that.
839 struct cred *new; in join_session_keyring() local
843 new = prepare_creds(); in join_session_keyring()
844 if (!new) in join_session_keyring()
850 ret = install_session_keyring_to_cred(new, NULL); in join_session_keyring()
854 serial = new->session_keyring->serial; in join_session_keyring()
855 ret = commit_creds(new); in join_session_keyring()
867 /* not found - try and create a new one */ in join_session_keyring()
879 } else if (keyring == new->session_keyring) { in join_session_keyring()
885 ret = install_session_keyring_to_cred(new, keyring); in join_session_keyring()
889 commit_creds(new); in join_session_keyring()
902 abort_creds(new); in join_session_keyring()
913 struct cred *new = container_of(twork, struct cred, rcu); in key_change_session_keyring() local
916 put_cred(new); in key_change_session_keyring()
920 new-> uid = old-> uid; in key_change_session_keyring()
921 new-> euid = old-> euid; in key_change_session_keyring()
922 new-> suid = old-> suid; in key_change_session_keyring()
923 new->fsuid = old->fsuid; in key_change_session_keyring()
924 new-> gid = old-> gid; in key_change_session_keyring()
925 new-> egid = old-> egid; in key_change_session_keyring()
926 new-> sgid = old-> sgid; in key_change_session_keyring()
927 new->fsgid = old->fsgid; in key_change_session_keyring()
928 new->user = get_uid(old->user); in key_change_session_keyring()
929 new->user_ns = get_user_ns(old->user_ns); in key_change_session_keyring()
930 new->group_info = get_group_info(old->group_info); in key_change_session_keyring()
932 new->securebits = old->securebits; in key_change_session_keyring()
933 new->cap_inheritable = old->cap_inheritable; in key_change_session_keyring()
934 new->cap_permitted = old->cap_permitted; in key_change_session_keyring()
935 new->cap_effective = old->cap_effective; in key_change_session_keyring()
936 new->cap_ambient = old->cap_ambient; in key_change_session_keyring()
937 new->cap_bset = old->cap_bset; in key_change_session_keyring()
939 new->jit_keyring = old->jit_keyring; in key_change_session_keyring()
940 new->thread_keyring = key_get(old->thread_keyring); in key_change_session_keyring()
941 new->process_keyring = key_get(old->process_keyring); in key_change_session_keyring()
943 security_transfer_creds(new, old); in key_change_session_keyring()
945 commit_creds(new); in key_change_session_keyring()