Lines Matching refs: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()
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()
840 struct cred *new; in join_session_keyring() local
844 new = prepare_creds(); in join_session_keyring()
845 if (!new) in join_session_keyring()
851 ret = install_session_keyring_to_cred(new, NULL); in join_session_keyring()
855 serial = new->session_keyring->serial; in join_session_keyring()
856 ret = commit_creds(new); 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()
890 commit_creds(new); in join_session_keyring()
903 abort_creds(new); in join_session_keyring()
914 struct cred *new = container_of(twork, struct cred, rcu); in key_change_session_keyring() local
917 put_cred(new); in key_change_session_keyring()
924 put_cred(new); in key_change_session_keyring()
928 new-> uid = old-> uid; in key_change_session_keyring()
929 new-> euid = old-> euid; in key_change_session_keyring()
930 new-> suid = old-> suid; in key_change_session_keyring()
931 new->fsuid = old->fsuid; in key_change_session_keyring()
932 new-> gid = old-> gid; in key_change_session_keyring()
933 new-> egid = old-> egid; in key_change_session_keyring()
934 new-> sgid = old-> sgid; in key_change_session_keyring()
935 new->fsgid = old->fsgid; in key_change_session_keyring()
936 new->user = get_uid(old->user); in key_change_session_keyring()
937 new->ucounts = old->ucounts; in key_change_session_keyring()
938 new->user_ns = get_user_ns(old->user_ns); in key_change_session_keyring()
939 new->group_info = get_group_info(old->group_info); in key_change_session_keyring()
941 new->securebits = old->securebits; in key_change_session_keyring()
942 new->cap_inheritable = old->cap_inheritable; in key_change_session_keyring()
943 new->cap_permitted = old->cap_permitted; in key_change_session_keyring()
944 new->cap_effective = old->cap_effective; in key_change_session_keyring()
945 new->cap_ambient = old->cap_ambient; in key_change_session_keyring()
946 new->cap_bset = old->cap_bset; in key_change_session_keyring()
948 new->jit_keyring = old->jit_keyring; in key_change_session_keyring()
949 new->thread_keyring = key_get(old->thread_keyring); in key_change_session_keyring()
950 new->process_keyring = key_get(old->process_keyring); in key_change_session_keyring()
952 security_transfer_creds(new, old); in key_change_session_keyring()
954 commit_creds(new); in key_change_session_keyring()