/fs/nfs/ |
D | nfs4state.c | 71 int nfs4_init_clientid(struct nfs_client *clp, struct rpc_cred *cred) in nfs4_init_clientid() argument 87 status = nfs4_proc_setclientid(clp, NFS4_CALLBACK, port, cred, &clid); in nfs4_init_clientid() 94 status = nfs4_proc_setclientid_confirm(clp, &clid, cred); in nfs4_init_clientid() 118 struct rpc_cred *cred) in nfs40_discover_server_trunking() argument 132 status = nfs4_proc_setclientid(clp, NFS4_CALLBACK, port, cred, &clid); in nfs40_discover_server_trunking() 138 status = nfs40_walk_client_list(clp, result, cred); in nfs40_discover_server_trunking() 154 struct rpc_cred *cred = NULL; in nfs4_get_machine_cred_locked() local 157 cred = get_rpccred(clp->cl_machine_cred); in nfs4_get_machine_cred_locked() 158 return cred; in nfs4_get_machine_cred_locked() 163 struct rpc_cred *cred, *new; in nfs4_root_machine_cred() local [all …]
|
D | dir.c | 70 …c struct nfs_open_dir_context *alloc_nfs_open_dir_context(struct inode *dir, struct rpc_cred *cred) in alloc_nfs_open_dir_context() argument 80 ctx->cred = get_rpccred(cred); in alloc_nfs_open_dir_context() 94 put_rpccred(ctx->cred); in put_nfs_open_dir_context() 106 struct rpc_cred *cred; in nfs_opendir() local 112 cred = rpc_lookup_cred(); in nfs_opendir() 113 if (IS_ERR(cred)) in nfs_opendir() 114 return PTR_ERR(cred); in nfs_opendir() 115 ctx = alloc_nfs_open_dir_context(inode, cred); in nfs_opendir() 129 put_rpccred(cred); in nfs_opendir() 385 struct rpc_cred *cred = ctx->cred; in nfs_readdir_xdr_filler() local [all …]
|
D | nfs4renewd.c | 60 struct rpc_cred *cred; in nfs4_renew_state() local 82 cred = ops->get_state_renewal_cred_locked(clp); in nfs4_renew_state() 84 if (cred == NULL) { in nfs4_renew_state() 94 ret = ops->sched_state_renewal(clp, cred, renew_flags); in nfs4_renew_state() 95 put_rpccred(cred); in nfs4_renew_state()
|
D | unlink.c | 34 put_rpccred(data->cred); in nfs_free_unlinkdata() 122 .rpc_cred = data->cred, in nfs_do_call_unlink() 262 data->cred = rpc_lookup_cred(); in nfs_async_unlink() 263 if (IS_ERR(data->cred)) { in nfs_async_unlink() 264 status = PTR_ERR(data->cred); in nfs_async_unlink() 286 put_rpccred(data->cred); in nfs_async_unlink() 378 put_rpccred(data->cred); in nfs_async_rename_release() 423 data->cred = rpc_lookup_cred(); in nfs_async_rename() 424 if (IS_ERR(data->cred)) { in nfs_async_rename() 425 struct rpc_task *task = ERR_CAST(data->cred); in nfs_async_rename() [all …]
|
D | delegation.h | 17 struct rpc_cred *cred; member 37 int nfs_inode_set_delegation(struct inode *inode, struct rpc_cred *cred, struct nfs_openres *res); 38 void nfs_inode_reclaim_delegation(struct inode *inode, struct rpc_cred *cred, struct nfs_openres *r… 56 int nfs4_proc_delegreturn(struct inode *inode, struct rpc_cred *cred, const nfs4_stateid *stateid, …
|
D | nfs4proc.c | 83 static int nfs4_do_setattr(struct inode *inode, struct rpc_cred *cred, 2158 static int nfs4_opendata_access(struct rpc_cred *cred, in nfs4_opendata_access() argument 2182 cache.cred = cred; in nfs4_opendata_access() 2326 struct rpc_cred *cred; in nfs41_check_delegation_stateid() local 2338 cred = get_rpccred(delegation->cred); in nfs41_check_delegation_stateid() 2340 status = nfs41_test_stateid(server, &stateid, cred); in nfs41_check_delegation_stateid() 2347 nfs41_free_stateid(server, &stateid, cred); in nfs41_check_delegation_stateid() 2351 put_rpccred(cred); in nfs41_check_delegation_stateid() 2366 struct rpc_cred *cred = state->owner->so_cred; in nfs41_check_open_stateid() local 2375 status = nfs41_test_stateid(server, stateid, cred); in nfs41_check_open_stateid() [all …]
|
D | delegation.c | 27 if (delegation->cred) { in nfs_free_delegation() 28 put_rpccred(delegation->cred); in nfs_free_delegation() 29 delegation->cred = NULL; in nfs_free_delegation() 186 void nfs_inode_reclaim_delegation(struct inode *inode, struct rpc_cred *cred, in nfs_inode_reclaim_delegation() argument 200 oldcred = delegation->cred; in nfs_inode_reclaim_delegation() 201 delegation->cred = get_rpccred(cred); in nfs_inode_reclaim_delegation() 212 nfs_inode_set_delegation(inode, cred, res); in nfs_inode_reclaim_delegation() 225 delegation->cred, in nfs_do_return_delegation() 347 int nfs_inode_set_delegation(struct inode *inode, struct rpc_cred *cred, struct nfs_openres *res) in nfs_inode_set_delegation() argument 363 delegation->cred = get_rpccred(cred); in nfs_inode_set_delegation()
|
D | nfs4idmap.c | 56 static const struct cred *id_resolver_cache; 189 struct cred *cred; in nfs_idmap_init() local 196 cred = prepare_kernel_cred(NULL); in nfs_idmap_init() 197 if (!cred) in nfs_idmap_init() 201 GLOBAL_ROOT_UID, GLOBAL_ROOT_GID, cred, in nfs_idmap_init() 219 cred->thread_keyring = keyring; in nfs_idmap_init() 220 cred->jit_keyring = KEY_REQKEY_DEFL_THREAD_KEYRING; in nfs_idmap_init() 221 id_resolver_cache = cred; in nfs_idmap_init() 229 put_cred(cred); in nfs_idmap_init() 298 const struct cred *saved_cred; in nfs_idmap_get_key()
|
D | pnfs_dev.c | 98 struct rpc_cred *cred, gfp_t gfp_flags) in nfs4_get_device_info() argument 141 rc = nfs4_proc_getdeviceinfo(server, pdev, cred); in nfs4_get_device_info() 188 const struct nfs4_deviceid *id, struct rpc_cred *cred, in nfs4_find_get_deviceid() argument 198 new = nfs4_get_device_info(server, id, cred, gfp_mask); in nfs4_find_get_deviceid()
|
D | nfs4session.c | 491 struct rpc_cred *cred; in nfs4_destroy_session() local 493 cred = nfs4_get_clid_cred(session->clp); in nfs4_destroy_session() 494 nfs4_proc_destroy_session(session, cred); in nfs4_destroy_session() 495 if (cred) in nfs4_destroy_session() 496 put_rpccred(cred); in nfs4_destroy_session()
|
/fs/proc/ |
D | array.c | 150 const struct cred *cred; in task_state() local 164 cred = get_task_cred(p); in task_state() 184 from_kuid_munged(user_ns, cred->uid), in task_state() 185 from_kuid_munged(user_ns, cred->euid), in task_state() 186 from_kuid_munged(user_ns, cred->suid), in task_state() 187 from_kuid_munged(user_ns, cred->fsuid), in task_state() 188 from_kgid_munged(user_ns, cred->gid), in task_state() 189 from_kgid_munged(user_ns, cred->egid), in task_state() 190 from_kgid_munged(user_ns, cred->sgid), in task_state() 191 from_kgid_munged(user_ns, cred->fsgid), in task_state() [all …]
|
D | fd.c | 87 const struct cred *cred; in tid_fd_revalidate() local 113 cred = __task_cred(task); in tid_fd_revalidate() 114 inode->i_uid = cred->euid; in tid_fd_revalidate() 115 inode->i_gid = cred->egid; in tid_fd_revalidate()
|
/fs/sdcardfs/ |
D | inode.c | 25 const struct cred *override_fsids(struct sdcardfs_sb_info *sbi, in override_fsids() 28 struct cred *cred; in override_fsids() local 29 const struct cred *old_cred; in override_fsids() 32 cred = prepare_creds(); in override_fsids() 33 if (!cred) in override_fsids() 44 cred->fsuid = make_kuid(&init_user_ns, uid); in override_fsids() 45 cred->fsgid = make_kgid(&init_user_ns, sbi->options.fs_low_gid); in override_fsids() 47 old_cred = override_creds(cred); in override_fsids() 52 void revert_fsids(const struct cred *old_cred) in revert_fsids() 54 const struct cred *cur_cred; in revert_fsids() [all …]
|
D | lookup.c | 283 const struct cred *cred = current_cred(); in __sdcardfs_lookup() local 296 file = dentry_open(lower_parent_path, O_RDONLY, cred); in __sdcardfs_lookup() 419 const struct cred *saved_cred = NULL; in sdcardfs_lookup()
|
/fs/nfs/flexfilelayout/ |
D | flexfilelayoutdev.c | 338 if (ds->ds_clp && !mirror->cred && in ff_layout_update_mirror_cred() 341 struct rpc_cred *cred; in ff_layout_update_mirror_cred() local 348 cred = auth->au_ops->lookup_cred(auth, &acred, 0); in ff_layout_update_mirror_cred() 349 if (IS_ERR(cred)) { in ff_layout_update_mirror_cred() 351 __func__, PTR_ERR(cred)); in ff_layout_update_mirror_cred() 352 return PTR_ERR(cred); in ff_layout_update_mirror_cred() 354 if (cmpxchg(&mirror->cred, NULL, cred)) in ff_layout_update_mirror_cred() 355 put_rpccred(cred); in ff_layout_update_mirror_cred() 462 struct rpc_cred *cred = ERR_PTR(-EINVAL); in ff_layout_get_ds_cred() local 467 if (mirror && mirror->cred) in ff_layout_get_ds_cred() [all …]
|
/fs/ |
D | coredump.c | 168 const struct cred *cred = current_cred(); in format_corename() local 220 cred->uid)); in format_corename() 226 cred->gid)); in format_corename() 494 static int umh_pipe_setup(struct subprocess_info *info, struct cred *new) in umh_pipe_setup() 518 const struct cred *old_cred; in do_coredump() 519 struct cred *cred; in do_coredump() local 547 cred = prepare_creds(); in do_coredump() 548 if (!cred) in do_coredump() 558 cred->fsuid = GLOBAL_ROOT_UID; /* Dump root private */ in do_coredump() 566 old_cred = override_creds(cred); in do_coredump() [all …]
|
D | fcntl.c | 93 const struct cred *cred = current_cred(); in f_modown() local 94 filp->f_owner.uid = cred->uid; in f_modown() 95 filp->f_owner.euid = cred->euid; in f_modown() 439 const struct cred *cred; in sigio_perm() local 443 cred = __task_cred(p); in sigio_perm() 445 uid_eq(fown->euid, cred->suid) || uid_eq(fown->euid, cred->uid) || in sigio_perm() 446 uid_eq(fown->uid, cred->suid) || uid_eq(fown->uid, cred->uid)) && in sigio_perm()
|
D | open.c | 348 const struct cred *old_cred; in SYSCALL_DEFINE3() 349 struct cred *override_cred; in SYSCALL_DEFINE3() 717 const struct cred *cred) in do_dentry_open() argument 757 error = security_file_open(f, cred); in do_dentry_open() 873 const struct cred *cred) in vfs_open() argument 881 return do_dentry_open(file, inode, NULL, cred); in vfs_open() 885 const struct cred *cred) in dentry_open() argument 890 validate_creds(cred); in dentry_open() 898 error = vfs_open(path, f, cred); in dentry_open()
|
D | binfmt_elf_fdpic.c | 498 const struct cred *cred = current_cred(); in create_elf_fdpic_tables() local 647 NEW_AUX_ENT(AT_UID, (elf_addr_t) from_kuid_munged(cred->user_ns, cred->uid)); in create_elf_fdpic_tables() 648 NEW_AUX_ENT(AT_EUID, (elf_addr_t) from_kuid_munged(cred->user_ns, cred->euid)); in create_elf_fdpic_tables() 649 NEW_AUX_ENT(AT_GID, (elf_addr_t) from_kgid_munged(cred->user_ns, cred->gid)); in create_elf_fdpic_tables() 650 NEW_AUX_ENT(AT_EGID, (elf_addr_t) from_kgid_munged(cred->user_ns, cred->egid)); in create_elf_fdpic_tables() 1405 const struct cred *cred; in fill_psinfo() local 1436 cred = __task_cred(p); in fill_psinfo() 1437 SET_UID(psinfo->pr_uid, from_kuid_munged(cred->user_ns, cred->uid)); in fill_psinfo() 1438 SET_GID(psinfo->pr_gid, from_kgid_munged(cred->user_ns, cred->gid)); in fill_psinfo()
|
D | exec.c | 1204 if (!uid_eq(bprm->cred->uid, current_euid()) || in setup_new_exec() 1205 !gid_eq(bprm->cred->gid, current_egid())) { in setup_new_exec() 1230 bprm->cred = prepare_exec_creds(); in prepare_bprm_creds() 1231 if (likely(bprm->cred)) in prepare_bprm_creds() 1241 if (bprm->cred) { in free_bprm() 1243 abort_creds(bprm->cred); in free_bprm() 1274 commit_creds(bprm->cred); in install_exec_creds() 1275 bprm->cred = NULL; in install_exec_creds() 1344 bprm->cred->euid = current_euid(); in bprm_fill_uid() 1345 bprm->cred->egid = current_egid(); in bprm_fill_uid() [all …]
|
/fs/cachefiles/ |
D | security.c | 22 struct cred *new; in cachefiles_get_security_ID() 81 const struct cred **_saved_cred) in cachefiles_determine_cache_security() 83 struct cred *new; in cachefiles_determine_cache_security()
|
D | interface.c | 122 const struct cred *saved_cred; in cachefiles_lookup_object() 204 const struct cred *saved_cred; in cachefiles_update_object() 255 const struct cred *saved_cred; in cachefiles_drop_object() 364 const struct cred *saved_cred; in cachefiles_sync_cache() 394 const struct cred *saved_cred; in cachefiles_check_consistency() 419 const struct cred *saved_cred; in cachefiles_attr_changed() 488 const struct cred *saved_cred; in cachefiles_invalidate_object()
|
D | internal.h | 63 const struct cred *cache_cred; /* security override for accessing cache */ 222 const struct cred **_saved_cred); 225 const struct cred **_saved_cred) in cachefiles_begin_secure() 231 const struct cred *saved_cred) in cachefiles_end_secure()
|
/fs/cifs/ |
D | cifsacl.c | 45 static const struct cred *root_cred; 207 const struct cred *saved_cred; in id_to_sid() 265 const struct cred *saved_cred; in sid_to_id() 342 struct cred *cred; in init_cifs_idmap() local 355 cred = prepare_kernel_cred(NULL); in init_cifs_idmap() 356 if (!cred) in init_cifs_idmap() 360 GLOBAL_ROOT_UID, GLOBAL_ROOT_GID, cred, in init_cifs_idmap() 376 cred->thread_keyring = keyring; in init_cifs_idmap() 377 cred->jit_keyring = KEY_REQKEY_DEFL_THREAD_KEYRING; in init_cifs_idmap() 378 root_cred = cred; in init_cifs_idmap() [all …]
|
/fs/ecryptfs/ |
D | kthread.c | 133 const struct cred *cred) in ecryptfs_privileged_open() argument 148 (*lower_file) = dentry_open(&req.path, flags, cred); in ecryptfs_privileged_open()
|