Home
last modified time | relevance | path

Searched refs:cred (Results 1 – 172 of 172) sorted by relevance

/linux-4.4.14/kernel/
Dcred.c43 struct cred init_cred = {
67 static inline void set_cred_subscribers(struct cred *cred, int n) in set_cred_subscribers() argument
70 atomic_set(&cred->subscribers, n); in set_cred_subscribers()
74 static inline int read_cred_subscribers(const struct cred *cred) in read_cred_subscribers() argument
77 return atomic_read(&cred->subscribers); in read_cred_subscribers()
83 static inline void alter_cred_subscribers(const struct cred *_cred, int n) in alter_cred_subscribers()
86 struct cred *cred = (struct cred *) _cred; in alter_cred_subscribers() local
88 atomic_add(n, &cred->subscribers); in alter_cred_subscribers()
97 struct cred *cred = container_of(rcu, struct cred, rcu); in put_cred_rcu() local
99 kdebug("put_cred_rcu(%p)", cred); in put_cred_rcu()
[all …]
Duid16.c62 const struct cred *cred = current_cred(); in SYSCALL_DEFINE3() local
66 ruid = high2lowuid(from_kuid_munged(cred->user_ns, cred->uid)); in SYSCALL_DEFINE3()
67 euid = high2lowuid(from_kuid_munged(cred->user_ns, cred->euid)); in SYSCALL_DEFINE3()
68 suid = high2lowuid(from_kuid_munged(cred->user_ns, cred->suid)); in SYSCALL_DEFINE3()
86 const struct cred *cred = current_cred(); in SYSCALL_DEFINE3() local
90 rgid = high2lowgid(from_kgid_munged(cred->user_ns, cred->gid)); in SYSCALL_DEFINE3()
91 egid = high2lowgid(from_kgid_munged(cred->user_ns, cred->egid)); in SYSCALL_DEFINE3()
92 sgid = high2lowgid(from_kgid_munged(cred->user_ns, cred->sgid)); in SYSCALL_DEFINE3()
153 const struct cred *cred = current_cred(); in SYSCALL_DEFINE2() local
159 i = cred->group_info->ngroups; in SYSCALL_DEFINE2()
[all …]
Dgroups.c159 void set_groups(struct cred *new, struct group_info *group_info) in set_groups()
178 struct cred *new; in set_current_groups()
192 const struct cred *cred = current_cred(); in SYSCALL_DEFINE2() local
199 i = cred->group_info->ngroups; in SYSCALL_DEFINE2()
205 if (groups_to_user(grouplist, cred->group_info)) { in SYSCALL_DEFINE2()
257 const struct cred *cred = current_cred(); in in_group_p() local
260 if (!gid_eq(grp, cred->fsgid)) in in_group_p()
261 retval = groups_search(cred->group_info, grp); in in_group_p()
269 const struct cred *cred = current_cred(); in in_egroup_p() local
272 if (!gid_eq(grp, cred->egid)) in in_egroup_p()
[all …]
Duser_namespace.c33 static void set_cred_user_ns(struct cred *cred, struct user_namespace *user_ns) in set_cred_user_ns() argument
38 cred->securebits = SECUREBITS_DEFAULT; in set_cred_user_ns()
39 cred->cap_inheritable = CAP_EMPTY_SET; in set_cred_user_ns()
40 cred->cap_permitted = CAP_FULL_SET; in set_cred_user_ns()
41 cred->cap_effective = CAP_FULL_SET; in set_cred_user_ns()
42 cred->cap_ambient = CAP_EMPTY_SET; in set_cred_user_ns()
43 cred->cap_bset = CAP_FULL_SET; in set_cred_user_ns()
45 key_put(cred->request_key_auth); in set_cred_user_ns()
46 cred->request_key_auth = NULL; in set_cred_user_ns()
49 cred->user_ns = user_ns; in set_cred_user_ns()
[all …]
Dsys.c137 const struct cred *cred = current_cred(), *pcred = __task_cred(p); in set_one_prio_perm() local
139 if (uid_eq(pcred->uid, cred->euid) || in set_one_prio_perm()
140 uid_eq(pcred->euid, cred->euid)) in set_one_prio_perm()
179 const struct cred *cred = current_cred(); in SYSCALL_DEFINE3() local
215 uid = make_kuid(cred->user_ns, who); in SYSCALL_DEFINE3()
216 user = cred->user; in SYSCALL_DEFINE3()
218 uid = cred->uid; in SYSCALL_DEFINE3()
219 else if (!uid_eq(uid, cred->uid)) { in SYSCALL_DEFINE3()
228 if (!uid_eq(uid, cred->uid)) in SYSCALL_DEFINE3()
249 const struct cred *cred = current_cred(); in SYSCALL_DEFINE2() local
[all …]
Dauditsc.c359 const struct cred *cred, in audit_field_compare() argument
367 return audit_compare_uid(cred->uid, name, f, ctx); in audit_field_compare()
369 return audit_compare_gid(cred->gid, name, f, ctx); in audit_field_compare()
371 return audit_compare_uid(cred->euid, name, f, ctx); in audit_field_compare()
373 return audit_compare_gid(cred->egid, name, f, ctx); in audit_field_compare()
377 return audit_compare_uid(cred->suid, name, f, ctx); in audit_field_compare()
379 return audit_compare_gid(cred->sgid, name, f, ctx); in audit_field_compare()
381 return audit_compare_uid(cred->fsuid, name, f, ctx); in audit_field_compare()
383 return audit_compare_gid(cred->fsgid, name, f, ctx); in audit_field_compare()
386 return audit_uid_comparator(cred->uid, f->op, tsk->loginuid); in audit_field_compare()
[all …]
Daudit.c1877 const struct cred *cred; in audit_log_task_info() local
1885 cred = current_cred(); in audit_log_task_info()
1901 from_kuid(&init_user_ns, cred->uid), in audit_log_task_info()
1902 from_kgid(&init_user_ns, cred->gid), in audit_log_task_info()
1903 from_kuid(&init_user_ns, cred->euid), in audit_log_task_info()
1904 from_kuid(&init_user_ns, cred->suid), in audit_log_task_info()
1905 from_kuid(&init_user_ns, cred->fsuid), in audit_log_task_info()
1906 from_kgid(&init_user_ns, cred->egid), in audit_log_task_info()
1907 from_kgid(&init_user_ns, cred->sgid), in audit_log_task_info()
1908 from_kgid(&init_user_ns, cred->fsgid), in audit_log_task_info()
Dsignal.c694 const struct cred *cred = current_cred(); in kill_ok_by_cred() local
695 const struct cred *tcred = __task_cred(t); in kill_ok_by_cred()
697 if (uid_eq(cred->euid, tcred->suid) || in kill_ok_by_cred()
698 uid_eq(cred->euid, tcred->uid) || in kill_ok_by_cred()
699 uid_eq(cred->uid, tcred->suid) || in kill_ok_by_cred()
700 uid_eq(cred->uid, tcred->uid)) in kill_ok_by_cred()
1319 static int kill_as_cred_perm(const struct cred *cred, in kill_as_cred_perm() argument
1322 const struct cred *pcred = __task_cred(target); in kill_as_cred_perm()
1323 if (!uid_eq(cred->euid, pcred->suid) && !uid_eq(cred->euid, pcred->uid) && in kill_as_cred_perm()
1324 !uid_eq(cred->uid, pcred->suid) && !uid_eq(cred->uid, pcred->uid)) in kill_as_cred_perm()
[all …]
Dptrace.c221 const struct cred *cred = current_cred(), *tcred; in __ptrace_may_access() local
245 caller_uid = cred->fsuid; in __ptrace_may_access()
246 caller_gid = cred->fsgid; in __ptrace_may_access()
256 caller_uid = cred->uid; in __ptrace_may_access()
257 caller_gid = cred->gid; in __ptrace_may_access()
Dkmod.c218 struct cred *new; in call_usermodehelper_exec_async()
521 int (*init)(struct subprocess_info *info, struct cred *new), in call_usermodehelper_setup()
Dtsacct.c33 const struct cred *tcred; in bacct_add_tsk()
Dnsproxy.c177 struct nsproxy **new_nsp, struct cred *new_cred, struct fs_struct *new_fs) in unshare_nsproxy_namespaces()
Dcapability.c228 struct cred *new; in SYSCALL_DEFINE2()
DMakefile11 notifier.o ksysfs.o cred.o reboot.o \
Dacct.c472 const struct cred *orig_cred; in do_acct_process()
Dcgroup.c2678 const struct cred *cred = current_cred(); in cgroup_procs_write_permission() local
2679 const struct cred *tcred = get_task_cred(task); in cgroup_procs_write_permission()
2686 if (!uid_eq(cred->euid, GLOBAL_ROOT_UID) && in cgroup_procs_write_permission()
2687 !uid_eq(cred->euid, tcred->uid) && in cgroup_procs_write_permission()
2688 !uid_eq(cred->euid, tcred->suid)) in cgroup_procs_write_permission()
Dfork.c1657 atomic_dec(&p->cred->user->processes); in copy_process()
1960 struct cred *new_cred = NULL; in SYSCALL_DEFINE1()
/linux-4.4.14/include/linux/
Dcred.h23 struct cred;
87 extern void set_groups(struct cred *, struct group_info *);
118 struct cred { struct
158 extern void __put_cred(struct cred *); argument
161 extern const struct cred *get_task_cred(struct task_struct *);
162 extern struct cred *cred_alloc_blank(void);
163 extern struct cred *prepare_creds(void);
164 extern struct cred *prepare_exec_creds(void);
165 extern int commit_creds(struct cred *);
166 extern void abort_creds(struct cred *);
[all …]
Dsecurity.h33 struct cred;
70 extern int cap_capable(const struct cred *cred, struct user_namespace *ns,
76 extern int cap_capset(struct cred *new, const struct cred *old,
90 extern int cap_task_fix_setuid(struct cred *new, const struct cred *old, int flags);
198 int security_capset(struct cred *new, const struct cred *old,
202 int security_capable(const struct cred *cred, struct user_namespace *ns,
204 int security_capable_noaudit(const struct cred *cred, struct user_namespace *ns,
292 int security_file_open(struct file *file, const struct cred *cred);
295 int security_cred_alloc_blank(struct cred *cred, gfp_t gfp);
296 void security_cred_free(struct cred *cred);
[all …]
Dlsm_hooks.h1318 int (*capset)(struct cred *new, const struct cred *old,
1322 int (*capable)(const struct cred *cred, struct user_namespace *ns,
1442 int (*file_open)(struct file *file, const struct cred *cred);
1446 int (*cred_alloc_blank)(struct cred *cred, gfp_t gfp);
1447 void (*cred_free)(struct cred *cred);
1448 int (*cred_prepare)(struct cred *new, const struct cred *old,
1450 void (*cred_transfer)(struct cred *new, const struct cred *old);
1451 int (*kernel_act_as)(struct cred *new, u32 secid);
1452 int (*kernel_create_files_as)(struct cred *new, struct inode *inode);
1456 int (*task_fix_setuid)(struct cred *new, const struct cred *old,
[all …]
Dkey.h79 struct cred;
212 const struct cred *cred,
286 const struct cred *cred,
348 extern int install_thread_keyring_to_cred(struct cred *cred);
Duser_namespace.h55 extern int create_user_ns(struct cred *new);
56 extern int unshare_userns(unsigned long unshare_flags, struct cred **new_cred);
82 static inline int create_user_ns(struct cred *new) in create_user_ns()
88 struct cred **new_cred) in unshare_userns()
Daudit.h253 const struct cred *new,
254 const struct cred *old);
255 extern void __audit_log_capset(const struct cred *new, const struct cred *old);
312 const struct cred *new, in audit_log_bprm_fcaps()
313 const struct cred *old) in audit_log_bprm_fcaps()
320 static inline void audit_log_capset(const struct cred *new, in audit_log_capset()
321 const struct cred *old) in audit_log_capset()
428 const struct cred *new, in audit_log_bprm_fcaps()
429 const struct cred *old) in audit_log_bprm_fcaps()
433 static inline void audit_log_capset(const struct cred *new, in audit_log_capset()
[all …]
Dkmod.h48 struct cred;
64 int (*init)(struct subprocess_info *info, struct cred *new);
74 int (*init)(struct subprocess_info *info, struct cred *new),
Dnfs_fs.h53 struct rpc_cred * cred; member
81 struct rpc_cred *cred; member
97 struct rpc_cred *cred; member
369 extern struct nfs_open_context *nfs_find_open_context(struct inode *inode, struct rpc_cred *cred, f…
446 return ctx->cred; in nfs_file_cred()
470 extern int nfs_may_open(struct inode *inode, struct rpc_cred *cred, int openflags);
Dbinfmts.h36 struct cred *cred; /* new credentials */ member
Dnsproxy.h70 struct cred *, struct fs_struct *);
Dinit_task.h131 extern struct cred init_cred;
225 RCU_POINTER_INITIALIZER(cred, &init_cred), \
Dnfs_xdr.h252 struct rpc_cred *cred; member
291 struct rpc_cred *cred; member
315 struct rpc_cred *cred; member
1382 struct rpc_cred *cred; member
1441 struct rpc_cred *cred; member
1470 struct rpc_cred *cred; member
1478 struct rpc_cred *cred; member
Dpnfs_osd_xdr.h106 void *cred; member
Dsocket.h13 struct cred;
Dsched.h1543 const struct cred __rcu *real_cred; /* objective and real subjective task
1545 const struct cred __rcu *cred; /* effective (overridable) subjective task member
2501 const struct cred *, u32);
Dfs.h50 struct cred;
859 const struct cred *f_cred;
2231 extern struct file * dentry_open(const struct path *, int, const struct cred *);
/linux-4.4.14/net/sunrpc/
Dauth.c300 rpcauth_unhash_cred_locked(struct rpc_cred *cred) in rpcauth_unhash_cred_locked() argument
302 hlist_del_rcu(&cred->cr_hash); in rpcauth_unhash_cred_locked()
304 clear_bit(RPCAUTH_CRED_HASHED, &cred->cr_flags); in rpcauth_unhash_cred_locked()
308 rpcauth_unhash_cred(struct rpc_cred *cred) in rpcauth_unhash_cred() argument
313 cache_lock = &cred->cr_auth->au_credcache->lock; in rpcauth_unhash_cred()
315 ret = atomic_read(&cred->cr_count) == 0; in rpcauth_unhash_cred()
317 rpcauth_unhash_cred_locked(cred); in rpcauth_unhash_cred()
353 rpcauth_key_timeout_notify(struct rpc_auth *auth, struct rpc_cred *cred) in rpcauth_key_timeout_notify() argument
355 if (!cred->cr_auth->au_ops->key_timeout) in rpcauth_key_timeout_notify()
357 return cred->cr_auth->au_ops->key_timeout(auth, cred); in rpcauth_key_timeout_notify()
[all …]
Dauth_unix.c63 struct unx_cred *cred; in unx_create_cred() local
71 if (!(cred = kmalloc(sizeof(*cred), GFP_NOFS))) in unx_create_cred()
74 rpcauth_init_cred(&cred->uc_base, acred, auth, &unix_credops); in unx_create_cred()
75 cred->uc_base.cr_flags = 1UL << RPCAUTH_CRED_UPTODATE; in unx_create_cred()
82 cred->uc_gid = acred->gid; in unx_create_cred()
84 cred->uc_gids[i] = GROUP_AT(acred->group_info, i); in unx_create_cred()
86 cred->uc_gids[i] = INVALID_GID; in unx_create_cred()
88 return &cred->uc_base; in unx_create_cred()
106 unx_destroy_cred(struct rpc_cred *cred) in unx_destroy_cred() argument
108 call_rcu(&cred->cr_rcu, unx_free_cred_callback); in unx_destroy_cred()
[all …]
Dauth_generic.c66 struct rpc_cred *cred, int lookupflags) in generic_bind_cred() argument
69 struct auth_cred *acred = &container_of(cred, struct generic_cred, gc_base)->acred; in generic_bind_cred()
113 generic_free_cred(struct rpc_cred *cred) in generic_free_cred() argument
115 struct generic_cred *gcred = container_of(cred, struct generic_cred, gc_base); in generic_free_cred()
126 struct rpc_cred *cred = container_of(head, struct rpc_cred, cr_rcu); in generic_free_cred_callback() local
127 generic_free_cred(cred); in generic_free_cred_callback()
131 generic_destroy_cred(struct rpc_cred *cred) in generic_destroy_cred() argument
133 call_rcu(&cred->cr_rcu, generic_free_cred_callback); in generic_destroy_cred()
151 generic_match(struct auth_cred *acred, struct rpc_cred *cred, int flags) in generic_match() argument
153 struct generic_cred *gcred = container_of(cred, struct generic_cred, gc_base); in generic_match()
[all …]
Dsvcauth_unix.c661 struct svc_cred *cred = &rqstp->rq_cred; in svcauth_unix_set_client() local
707 gi = unix_gid_find(cred->cr_uid, rqstp); in svcauth_unix_set_client()
716 put_group_info(cred->cr_group_info); in svcauth_unix_set_client()
717 cred->cr_group_info = gi; in svcauth_unix_set_client()
729 struct svc_cred *cred = &rqstp->rq_cred; in svcauth_null_accept() local
731 cred->cr_group_info = NULL; in svcauth_null_accept()
732 cred->cr_principal = NULL; in svcauth_null_accept()
750 cred->cr_uid = INVALID_UID; in svcauth_null_accept()
751 cred->cr_gid = INVALID_GID; in svcauth_null_accept()
752 cred->cr_group_info = groups_alloc(0); in svcauth_null_accept()
[all …]
Dauth_null.c47 nul_destroy_cred(struct rpc_cred *cred) in nul_destroy_cred() argument
55 nul_match(struct auth_cred *acred, struct rpc_cred *cred, int taskflags) in nul_match() argument
Dclnt.c2423 struct rpc_task *rpc_call_null(struct rpc_clnt *clnt, struct rpc_cred *cred, int flags) in rpc_call_null() argument
2427 .rpc_cred = cred, in rpc_call_null()
/linux-4.4.14/security/keys/
Dprocess_keys.c46 const struct cred *cred; in install_user_keyrings() local
54 cred = current_cred(); in install_user_keyrings()
55 user = cred->user; in install_user_keyrings()
56 uid = from_kuid(cred->user_ns, user->uid); in install_user_keyrings()
78 cred, user_keyring_perm, in install_user_keyrings()
94 cred, user_keyring_perm, in install_user_keyrings()
131 int install_thread_keyring_to_cred(struct cred *new) in install_thread_keyring_to_cred()
150 struct cred *new; in install_thread_keyring()
174 int install_process_keyring_to_cred(struct cred *new) in install_process_keyring_to_cred()
200 struct cred *new; in install_process_keyring()
[all …]
Drequest_key_auth.c117 if (rka->cred) { in request_key_auth_revoke()
118 put_cred(rka->cred); in request_key_auth_revoke()
119 rka->cred = NULL; in request_key_auth_revoke()
132 if (rka->cred) { in request_key_auth_destroy()
133 put_cred(rka->cred); in request_key_auth_destroy()
134 rka->cred = NULL; in request_key_auth_destroy()
151 const struct cred *cred = current->cred; in request_key_auth_new() local
173 if (cred->request_key_auth) { in request_key_auth_new()
175 down_read(&cred->request_key_auth->sem); in request_key_auth_new()
179 if (test_bit(KEY_FLAG_REVOKED, &cred->request_key_auth->flags)) in request_key_auth_new()
[all …]
Drequest_key.c56 static int umh_keys_init(struct subprocess_info *info, struct cred *cred) in umh_keys_init() argument
60 return install_session_keyring_to_cred(cred, keyring); in umh_keys_init()
98 const struct cred *cred = current_cred(); in call_sbin_request_key() local
116 cred = get_current_cred(); in call_sbin_request_key()
117 keyring = keyring_alloc(desc, cred->fsuid, cred->fsgid, cred, in call_sbin_request_key()
120 put_cred(cred); in call_sbin_request_key()
132 sprintf(uid_str, "%d", from_kuid(&init_user_ns, cred->fsuid)); in call_sbin_request_key()
133 sprintf(gid_str, "%d", from_kgid(&init_user_ns, cred->fsgid)); in call_sbin_request_key()
140 cred->thread_keyring ? cred->thread_keyring->serial : 0); in call_sbin_request_key()
143 if (cred->process_keyring) in call_sbin_request_key()
[all …]
Dpermission.c30 int key_task_permission(const key_ref_t key_ref, const struct cred *cred, in key_task_permission() argument
40 if (uid_eq(key->uid, cred->fsuid)) { in key_task_permission()
48 if (gid_eq(key->gid, cred->fsgid)) { in key_task_permission()
53 ret = groups_search(cred->group_info, key->gid); in key_task_permission()
77 return security_key_permission(key_ref, cred, perm); in key_task_permission()
Dinternal.h112 const struct cred *cred; member
142 extern int install_thread_keyring_to_cred(struct cred *);
143 extern int install_process_keyring_to_cred(struct cred *);
144 extern int install_session_keyring_to_cred(struct cred *, struct key *);
173 const struct cred *cred,
190 const struct cred *cred; member
Dkeyctl.c982 struct cred *new; in keyctl_change_reqkey_auth()
1007 const struct cred *cred = current_cred(); in keyctl_instantiate_key_common() local
1026 instkey = cred->request_key_auth; in keyctl_instantiate_key_common()
1174 const struct cred *cred = current_cred(); in keyctl_reject_key() local
1193 instkey = cred->request_key_auth; in keyctl_reject_key()
1231 struct cred *new; in keyctl_set_reqkey_keyring()
1462 const struct cred *mycred, *pcred; in keyctl_session_to_parent()
1465 struct cred *cred; in keyctl_session_to_parent() local
1477 cred = cred_alloc_blank(); in keyctl_session_to_parent()
1478 if (!cred) in keyctl_session_to_parent()
[all …]
Dkey.c225 kuid_t uid, kgid_t gid, const struct cred *cred, in key_alloc() argument
305 ret = security_key_alloc(key, cred, flags); in key_alloc()
786 const struct cred *cred = current_cred(); in key_create_or_update() local
876 cred->fsuid, cred->fsgid, cred, perm, flags); in key_create_or_update()
Dkeyring.c493 const struct cred *cred, key_perm_t perm, in keyring_alloc() argument
500 uid, gid, cred, perm, flags); in keyring_alloc()
565 ctx->cred, KEY_NEED_SEARCH) < 0) { in keyring_search_iterator()
745 ctx->cred, KEY_NEED_SEARCH) < 0) in search_nested_keyrings()
867 err = key_task_permission(keyring_ref, ctx->cred, KEY_NEED_SEARCH); in keyring_search_aux()
896 .cred = current_cred(), in keyring_search()
Dproc.c190 .cred = current_cred(), in proc_keys_show()
215 rc = key_task_permission(key_ref, ctx.cred, KEY_NEED_VIEW); in proc_keys_show()
/linux-4.4.14/drivers/staging/lustre/lustre/libcfs/linux/
Dlinux-curproc.c60 struct cred *cred; in cfs_cap_raise() local
62 cred = prepare_creds(); in cfs_cap_raise()
63 if (cred) { in cfs_cap_raise()
64 cap_raise(cred->cap_effective, cap); in cfs_cap_raise()
65 commit_creds(cred); in cfs_cap_raise()
71 struct cred *cred; in cfs_cap_lower() local
73 cred = prepare_creds(); in cfs_cap_lower()
74 if (cred) { in cfs_cap_lower()
75 cap_lower(cred->cap_effective, cap); in cfs_cap_lower()
76 commit_creds(cred); in cfs_cap_lower()
/linux-4.4.14/security/
Dcommoncap.c71 int cap_capable(const struct cred *cred, struct user_namespace *targ_ns, in cap_capable() argument
82 if (ns == cred->user_ns) in cap_capable()
83 return cap_raised(cred->cap_effective, cap) ? 0 : -EPERM; in cap_capable()
93 if ((ns->parent == cred->user_ns) && uid_eq(ns->owner, cred->euid)) in cap_capable()
139 const struct cred *cred, *child_cred; in cap_ptrace_access_check() local
143 cred = current_cred(); in cap_ptrace_access_check()
146 caller_caps = &cred->cap_effective; in cap_ptrace_access_check()
148 caller_caps = &cred->cap_permitted; in cap_ptrace_access_check()
149 if (cred->user_ns == child_cred->user_ns && in cap_ptrace_access_check()
176 const struct cred *cred, *child_cred; in cap_ptrace_traceme() local
[all …]
Dsecurity.c175 int security_capset(struct cred *new, const struct cred *old, in security_capset()
184 int security_capable(const struct cred *cred, struct user_namespace *ns, in security_capable() argument
187 return call_int_hook(capable, 0, cred, ns, cap, SECURITY_CAP_AUDIT); in security_capable()
190 int security_capable_noaudit(const struct cred *cred, struct user_namespace *ns, in security_capable_noaudit() argument
193 return call_int_hook(capable, 0, cred, ns, cap, SECURITY_CAP_NOAUDIT); in security_capable_noaudit()
836 int security_file_open(struct file *file, const struct cred *cred) in security_file_open() argument
840 ret = call_int_hook(file_open, 0, file, cred); in security_file_open()
857 int security_cred_alloc_blank(struct cred *cred, gfp_t gfp) in security_cred_alloc_blank() argument
859 return call_int_hook(cred_alloc_blank, 0, cred, gfp); in security_cred_alloc_blank()
862 void security_cred_free(struct cred *cred) in security_cred_free() argument
[all …]
/linux-4.4.14/include/linux/sunrpc/
Dsvcauth.h30 static inline void init_svc_cred(struct svc_cred *cred) in init_svc_cred() argument
32 cred->cr_group_info = NULL; in init_svc_cred()
33 cred->cr_principal = NULL; in init_svc_cred()
34 cred->cr_gss_mech = NULL; in init_svc_cred()
37 static inline void free_svc_cred(struct svc_cred *cred) in free_svc_cred() argument
39 if (cred->cr_group_info) in free_svc_cred()
40 put_group_info(cred->cr_group_info); in free_svc_cred()
41 kfree(cred->cr_principal); in free_svc_cred()
42 gss_mech_put(cred->cr_gss_mech); in free_svc_cred()
43 init_svc_cred(cred); in free_svc_cred()
Dauth.h195 struct rpc_cred * get_rpccred(struct rpc_cred *cred) in get_rpccred() argument
197 atomic_inc(&cred->cr_count); in get_rpccred()
198 return cred; in get_rpccred()
Dclnt.h170 struct rpc_task *rpc_call_null(struct rpc_clnt *clnt, struct rpc_cred *cred,
/linux-4.4.14/security/tomoyo/
Dtomoyo.c18 static int tomoyo_cred_alloc_blank(struct cred *new, gfp_t gfp) in tomoyo_cred_alloc_blank()
33 static int tomoyo_cred_prepare(struct cred *new, const struct cred *old, in tomoyo_cred_prepare()
49 static void tomoyo_cred_transfer(struct cred *new, const struct cred *old) in tomoyo_cred_transfer()
59 static void tomoyo_cred_free(struct cred *cred) in tomoyo_cred_free() argument
61 struct tomoyo_domain_info *domain = cred->security; in tomoyo_cred_free()
96 bprm->cred->security)->users); in tomoyo_bprm_set_creds()
101 bprm->cred->security = NULL; in tomoyo_bprm_set_creds()
114 struct tomoyo_domain_info *domain = bprm->cred->security; in tomoyo_bprm_check_security()
322 static int tomoyo_file_open(struct file *f, const struct cred *cred) in tomoyo_file_open() argument
540 struct cred *cred = (struct cred *) current_cred(); in tomoyo_init() local
[all …]
Dsecurityfs_if.c73 struct cred *cred = prepare_creds(); in tomoyo_write_self() local
74 if (!cred) { in tomoyo_write_self()
78 cred->security; in tomoyo_write_self()
79 cred->security = new_domain; in tomoyo_write_self()
82 commit_creds(cred); in tomoyo_write_self()
Ddomain.c843 bprm->cred->security = domain; in tomoyo_find_next_domain()
Dcommon.c929 (!uid_eq(task->cred->uid, GLOBAL_ROOT_UID) || in tomoyo_manager()
930 !uid_eq(task->cred->euid, GLOBAL_ROOT_UID))) in tomoyo_manager()
/linux-4.4.14/fs/nfs/
Dnfs4state.c71 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()
150 struct rpc_cred *cred = NULL; in nfs4_get_machine_cred_locked() local
153 cred = get_rpccred(clp->cl_machine_cred); in nfs4_get_machine_cred_locked()
154 return cred; in nfs4_get_machine_cred_locked()
159 struct rpc_cred *cred, *new; in nfs4_root_machine_cred() local
[all …]
Dnfs4renewd.c60 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()
Ddir.c70 …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()
373 struct rpc_cred *cred = ctx->cred; in nfs_readdir_xdr_filler() local
[all …]
Ddelegation.h17 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, …
Dunlink.c34 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 …]
Dnfs4idmap.c56 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()
Ddelegation.c27 if (delegation->cred) { in nfs_free_delegation()
28 put_rpccred(delegation->cred); in nfs_free_delegation()
29 delegation->cred = NULL; in nfs_free_delegation()
166 void nfs_inode_reclaim_delegation(struct inode *inode, struct rpc_cred *cred, in nfs_inode_reclaim_delegation() argument
180 oldcred = delegation->cred; in nfs_inode_reclaim_delegation()
181 delegation->cred = get_rpccred(cred); in nfs_inode_reclaim_delegation()
192 nfs_inode_set_delegation(inode, cred, res); in nfs_inode_reclaim_delegation()
205 delegation->cred, in nfs_do_return_delegation()
327 int nfs_inode_set_delegation(struct inode *inode, struct rpc_cred *cred, struct nfs_openres *res) in nfs_inode_set_delegation() argument
343 delegation->cred = get_rpccred(cred); in nfs_inode_set_delegation()
Dnfs4proc.c84 static int nfs4_do_setattr(struct inode *inode, struct rpc_cred *cred,
2159 static int nfs4_opendata_access(struct rpc_cred *cred, in nfs4_opendata_access() argument
2183 cache.cred = cred; in nfs4_opendata_access()
2329 struct rpc_cred *cred; in nfs41_check_delegation_stateid() local
2341 cred = get_rpccred(delegation->cred); in nfs41_check_delegation_stateid()
2343 status = nfs41_test_stateid(server, &stateid, cred); in nfs41_check_delegation_stateid()
2350 nfs41_free_stateid(server, &stateid, cred); in nfs41_check_delegation_stateid()
2354 put_rpccred(cred); in nfs41_check_delegation_stateid()
2369 struct rpc_cred *cred = state->owner->so_cred; in nfs41_check_open_stateid() local
2378 status = nfs41_test_stateid(server, stateid, cred); in nfs41_check_open_stateid()
[all …]
Dpnfs_dev.c98 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()
Dnfs4session.c491 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()
Dnfs4namespace.c174 struct rpc_cred *cred; in nfs_find_best_sec() local
185 cred = rpcauth_lookupcred(new->cl_auth, 0); in nfs_find_best_sec()
186 if (IS_ERR(cred)) { in nfs_find_best_sec()
190 put_rpccred(cred); in nfs_find_best_sec()
Dinode.c799 struct rpc_cred *cred = rpc_lookup_cred(); in alloc_nfs_open_context() local
800 if (IS_ERR(cred)) in alloc_nfs_open_context()
801 return ERR_CAST(cred); in alloc_nfs_open_context()
805 put_rpccred(cred); in alloc_nfs_open_context()
810 ctx->cred = cred; in alloc_nfs_open_context()
845 if (ctx->cred != NULL) in __put_nfs_open_context()
846 put_rpccred(ctx->cred); in __put_nfs_open_context()
890 struct nfs_open_context *nfs_find_open_context(struct inode *inode, struct rpc_cred *cred, fmode_t … in nfs_find_open_context() argument
897 if (cred != NULL && pos->cred != cred) in nfs_find_open_context()
Dpagelist.c63 hdr->cred = hdr->req->wb_context->cred; in nfs_pgheader_init()
617 struct rpc_cred *cred, const struct nfs_rpc_ops *rpc_ops, in nfs_initiate_pgio() argument
624 .rpc_cred = cred, in nfs_initiate_pgio()
856 hdr->cred, in nfs_generic_pg_pgios()
909 return ctx1->cred == ctx2->cred && ctx1->state == ctx2->state; in nfs_match_open_context()
Dinternal.h249 struct rpc_cred *cred, const struct nfs_rpc_ops *rpc_ops,
531 struct rpc_cred *cred);
534 struct rpc_cred *cred);
Dnfs4_fs.h242 extern int nfs4_proc_bind_conn_to_session(struct nfs_client *, struct rpc_cred *cred);
243 extern int nfs4_proc_exchange_id(struct nfs_client *clp, struct rpc_cred *cred);
Dclient.c154 struct rpc_cred *cred; in nfs_alloc_client() local
185 cred = rpc_lookup_machine_cred("*"); in nfs_alloc_client()
186 if (!IS_ERR(cred)) in nfs_alloc_client()
187 clp->cl_machine_cred = cred; in nfs_alloc_client()
Dpnfs.h229 struct rpc_cred *cred);
328 const struct nfs4_deviceid *id, struct rpc_cred *cred,
Dwrite.c1164 return rpcauth_key_timeout_notify(auth, ctx->cred); in nfs_key_timeout_notify()
1172 return rpcauth_cred_key_to_expire(ctx->cred); in nfs_ctx_key_to_expire()
1572 .rpc_cred = data->cred, in nfs_initiate_commit()
1631 data->cred = first->wb_context->cred; in nfs_init_commit()
Dnfs4client.c479 struct rpc_cred *cred) in nfs40_walk_client_list() argument
528 status = nfs4_proc_setclientid_confirm(pos, &clid, cred); in nfs40_walk_client_list()
615 struct rpc_cred *cred) in nfs41_walk_client_list() argument
Dnfs3proc.c196 .rpc_cred = entry->cred, in nfs3_proc_access()
623 nfs3_proc_readdir(struct dentry *dentry, struct rpc_cred *cred, in nfs3_proc_readdir() argument
644 .rpc_cred = cred in nfs3_proc_readdir()
Dproc.c487 nfs_proc_readdir(struct dentry *dentry, struct rpc_cred *cred, in nfs_proc_readdir() argument
500 .rpc_cred = cred, in nfs_proc_readdir()
Dpnfs.c902 lgp->cred = lo->plh_lc_cred; in send_layoutget()
973 lrp->cred = lo->plh_lc_cred; in pnfs_send_layoutreturn()
1310 lo->plh_lc_cred = get_rpccred(ctx->cred); in alloc_init_layout_hdr()
2276 data->cred = get_rpccred(nfsi->layout->plh_lc_cred); in pnfs_layoutcommit_inode()
2286 put_rpccred(data->cred); in pnfs_layoutcommit_inode()
/linux-4.4.14/net/sunrpc/auth_gss/
Dauth_gss.c137 gss_cred_set_ctx(struct rpc_cred *cred, struct gss_cl_ctx *ctx) in gss_cred_set_ctx() argument
139 struct gss_cred *gss_cred = container_of(cred, struct gss_cred, gc_base); in gss_cred_set_ctx()
141 if (!test_bit(RPCAUTH_CRED_NEW, &cred->cr_flags)) in gss_cred_set_ctx()
145 set_bit(RPCAUTH_CRED_UPTODATE, &cred->cr_flags); in gss_cred_set_ctx()
147 clear_bit(RPCAUTH_CRED_NEW, &cred->cr_flags); in gss_cred_set_ctx()
180 gss_cred_get_ctx(struct rpc_cred *cred) in gss_cred_get_ctx() argument
182 struct gss_cred *gss_cred = container_of(cred, struct gss_cred, gc_base); in gss_cred_get_ctx()
530 gss_setup_upcall(struct gss_auth *gss_auth, struct rpc_cred *cred) in gss_setup_upcall() argument
532 struct gss_cred *gss_cred = container_of(cred, in gss_setup_upcall()
535 kuid_t uid = cred->cr_uid; in gss_setup_upcall()
[all …]
Dsvcauth_gss.c330 struct svc_cred cred; member
343 free_svc_cred(&rsci->cred); in rsc_free()
380 init_svc_cred(&new->cred); in rsc_init()
393 new->cred = tmp->cred; in update_rsc()
394 init_svc_cred(&tmp->cred); in update_rsc()
456 rsci.cred.cr_uid = make_kuid(&init_user_ns, id); in rsc_parse()
461 rsci.cred.cr_gid = make_kgid(&init_user_ns, id); in rsc_parse()
469 rsci.cred.cr_group_info = groups_alloc(N); in rsc_parse()
470 if (rsci.cred.cr_group_info == NULL) in rsc_parse()
482 GROUP_AT(rsci.cred.cr_group_info, i) = kgid; in rsc_parse()
[all …]
Dgss_rpc_xdr.c551 struct gssx_cred *cred) in gssx_enc_cred() argument
556 err = gssx_enc_name(xdr, &cred->desired_name); in gssx_enc_cred()
561 err = dummy_enc_credel_array(xdr, &cred->elements); in gssx_enc_cred()
566 err = gssx_enc_buffer(xdr, &cred->cred_handle_reference); in gssx_enc_cred()
571 err = gssx_enc_bool(xdr, cred->needs_release); in gssx_enc_cred()
/linux-4.4.14/security/apparmor/
Dlsm.c49 static void apparmor_cred_free(struct cred *cred) in apparmor_cred_free() argument
51 aa_free_task_context(cred_cxt(cred)); in apparmor_cred_free()
52 cred_cxt(cred) = NULL; in apparmor_cred_free()
58 static int apparmor_cred_alloc_blank(struct cred *cred, gfp_t gfp) in apparmor_cred_alloc_blank() argument
65 cred_cxt(cred) = cxt; in apparmor_cred_alloc_blank()
72 static int apparmor_cred_prepare(struct cred *new, const struct cred *old, in apparmor_cred_prepare()
88 static void apparmor_cred_transfer(struct cred *new, const struct cred *old) in apparmor_cred_transfer()
112 const struct cred *cred; in apparmor_capget() local
115 cred = __task_cred(target); in apparmor_capget()
116 profile = aa_cred_profile(cred); in apparmor_capget()
[all …]
Ddomain.c355 cxt = cred_cxt(bprm->cred); in apparmor_bprm_set_creds()
548 struct aa_task_cxt *new_cxt = cred_cxt(bprm->cred); in apparmor_bprm_committing_creds()
606 const struct cred *cred; in aa_change_hat() local
624 cred = get_current_cred(); in aa_change_hat()
625 cxt = cred_cxt(cred); in aa_change_hat()
626 profile = aa_cred_profile(cred); in aa_change_hat()
723 put_cred(cred); in aa_change_hat()
746 const struct cred *cred; in aa_change_profile() local
765 cred = get_current_cred(); in aa_change_profile()
766 profile = aa_cred_profile(cred); in aa_change_profile()
[all …]
Dcontext.c97 struct cred *new; in aa_replace_current_profile()
135 struct cred *new = prepare_creds(); in aa_set_current_onexec()
161 struct cred *new = prepare_creds(); in aa_set_current_hat()
199 struct cred *new = prepare_creds(); in aa_restore_previous_profile()
/linux-4.4.14/arch/s390/kernel/
Dcompat_linux.c135 const struct cred *cred = current_cred(); in COMPAT_SYSCALL_DEFINE3() local
139 ruid = high2lowuid(from_kuid_munged(cred->user_ns, cred->uid)); in COMPAT_SYSCALL_DEFINE3()
140 euid = high2lowuid(from_kuid_munged(cred->user_ns, cred->euid)); in COMPAT_SYSCALL_DEFINE3()
141 suid = high2lowuid(from_kuid_munged(cred->user_ns, cred->suid)); in COMPAT_SYSCALL_DEFINE3()
159 const struct cred *cred = current_cred(); in COMPAT_SYSCALL_DEFINE3() local
163 rgid = high2lowgid(from_kgid_munged(cred->user_ns, cred->gid)); in COMPAT_SYSCALL_DEFINE3()
164 egid = high2lowgid(from_kgid_munged(cred->user_ns, cred->egid)); in COMPAT_SYSCALL_DEFINE3()
165 sgid = high2lowgid(from_kgid_munged(cred->user_ns, cred->sgid)); in COMPAT_SYSCALL_DEFINE3()
224 const struct cred *cred = current_cred(); in COMPAT_SYSCALL_DEFINE2() local
230 get_group_info(cred->group_info); in COMPAT_SYSCALL_DEFINE2()
[all …]
/linux-4.4.14/arch/alpha/kernel/
Dasm-offsets.c22 DEFINE(TASK_CRED, offsetof(struct task_struct, cred)); in foo()
28 DEFINE(CRED_UID, offsetof(struct cred, uid)); in foo()
29 DEFINE(CRED_EUID, offsetof(struct cred, euid)); in foo()
30 DEFINE(CRED_GID, offsetof(struct cred, gid)); in foo()
31 DEFINE(CRED_EGID, offsetof(struct cred, egid)); in foo()
/linux-4.4.14/net/dns_resolver/
Ddns_key.c44 const struct cred *dns_resolver_cache;
266 struct cred *cred; in init_dns_resolver() local
276 cred = prepare_kernel_cred(NULL); in init_dns_resolver()
277 if (!cred) in init_dns_resolver()
281 GLOBAL_ROOT_UID, GLOBAL_ROOT_GID, cred, in init_dns_resolver()
297 cred->thread_keyring = keyring; in init_dns_resolver()
298 cred->jit_keyring = KEY_REQKEY_DEFL_THREAD_KEYRING; in init_dns_resolver()
299 dns_resolver_cache = cred; in init_dns_resolver()
307 put_cred(cred); in init_dns_resolver()
Dinternal.h36 extern const struct cred *dns_resolver_cache;
Ddns_query.c74 const struct cred *saved_cred; in dns_query()
/linux-4.4.14/security/selinux/
Dhooks.c178 struct cred *cred = (struct cred *) current->real_cred; in cred_init_security() local
186 cred->security = tsec; in cred_init_security()
192 static inline u32 cred_sid(const struct cred *cred) in cred_sid() argument
196 tsec = cred->security; in cred_sid()
380 const struct cred *cred) in may_context_mount_sb_relabel() argument
382 const struct task_security_struct *tsec = cred->security; in may_context_mount_sb_relabel()
397 const struct cred *cred) in may_context_mount_inode_relabel() argument
399 const struct task_security_struct *tsec = cred->security; in may_context_mount_inode_relabel()
620 const struct cred *cred = current_cred(); in selinux_set_mnt_opts() local
761 rc = may_context_mount_sb_relabel(fscontext_sid, sbsec, cred); in selinux_set_mnt_opts()
[all …]
/linux-4.4.14/net/core/
Dscm.c49 const struct cred *cred = current_cred(); in scm_check_creds() local
50 kuid_t uid = make_kuid(cred->user_ns, creds->uid); in scm_check_creds()
51 kgid_t gid = make_kgid(cred->user_ns, creds->gid); in scm_check_creds()
58 ((uid_eq(uid, cred->uid) || uid_eq(uid, cred->euid) || in scm_check_creds()
59 uid_eq(uid, cred->suid)) || ns_capable(cred->user_ns, CAP_SETUID)) && in scm_check_creds()
60 ((gid_eq(gid, cred->gid) || gid_eq(gid, cred->egid) || in scm_check_creds()
61 gid_eq(gid, cred->sgid)) || ns_capable(cred->user_ns, CAP_SETGID))) { in scm_check_creds()
Dsock.c1016 static void cred_to_ucred(struct pid *pid, const struct cred *cred, in cred_to_ucred() argument
1021 if (cred) { in cred_to_ucred()
1024 ucred->uid = from_kuid_munged(current_ns, cred->euid); in cred_to_ucred()
1025 ucred->gid = from_kgid_munged(current_ns, cred->egid); in cred_to_ucred()
/linux-4.4.14/fs/proc/
Darray.c149 const struct cred *cred; in task_state() local
163 cred = get_task_cred(p); in task_state()
183 from_kuid_munged(user_ns, cred->uid), in task_state()
184 from_kuid_munged(user_ns, cred->euid), in task_state()
185 from_kuid_munged(user_ns, cred->suid), in task_state()
186 from_kuid_munged(user_ns, cred->fsuid), in task_state()
187 from_kgid_munged(user_ns, cred->gid), in task_state()
188 from_kgid_munged(user_ns, cred->egid), in task_state()
189 from_kgid_munged(user_ns, cred->sgid), in task_state()
190 from_kgid_munged(user_ns, cred->fsgid), in task_state()
[all …]
Dfd.c87 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()
Dbase.c1646 const struct cred *cred; in proc_pid_make_inode() local
1669 cred = __task_cred(task); in proc_pid_make_inode()
1670 inode->i_uid = cred->euid; in proc_pid_make_inode()
1671 inode->i_gid = cred->egid; in proc_pid_make_inode()
1688 const struct cred *cred; in pid_getattr() local
1708 cred = __task_cred(task); in pid_getattr()
1709 stat->uid = cred->euid; in pid_getattr()
1710 stat->gid = cred->egid; in pid_getattr()
1738 const struct cred *cred; in pid_revalidate() local
1750 cred = __task_cred(task); in pid_revalidate()
[all …]
/linux-4.4.14/fs/nfs/flexfilelayout/
Dflexfilelayoutdev.c337 if (ds->ds_clp && !mirror->cred && in ff_layout_update_mirror_cred()
340 struct rpc_cred *cred; in ff_layout_update_mirror_cred() local
347 cred = auth->au_ops->lookup_cred(auth, &acred, 0); in ff_layout_update_mirror_cred()
348 if (IS_ERR(cred)) { in ff_layout_update_mirror_cred()
350 __func__, PTR_ERR(cred)); in ff_layout_update_mirror_cred()
351 return PTR_ERR(cred); in ff_layout_update_mirror_cred()
353 if (cmpxchg(&mirror->cred, NULL, cred)) in ff_layout_update_mirror_cred()
354 put_rpccred(cred); in ff_layout_update_mirror_cred()
461 struct rpc_cred *cred = ERR_PTR(-EINVAL); in ff_layout_get_ds_cred() local
466 if (mirror && mirror->cred) in ff_layout_get_ds_cred()
[all …]
Dflexfilelayout.h81 struct rpc_cred *cred; member
Dflexfilelayout.c216 if (mirror->cred) in ff_layout_free_mirror()
217 put_rpccred(mirror->cred); in ff_layout_free_mirror()
1625 ds_cred = ff_layout_get_ds_cred(lseg, idx, hdr->cred); in ff_layout_read_pagelist()
1682 ds_cred = ff_layout_get_ds_cred(lseg, idx, hdr->cred); in ff_layout_write_pagelist()
1751 ds_cred = ff_layout_get_ds_cred(lseg, idx, data->cred); in ff_layout_initiate_commit()
1761 data->cred = ds_cred; in ff_layout_initiate_commit()
/linux-4.4.14/fs/
Dcoredump.c167 const struct cred *cred = current_cred(); in format_corename() local
219 cred->uid)); in format_corename()
225 cred->gid)); in format_corename()
491 static int umh_pipe_setup(struct subprocess_info *info, struct cred *new) in umh_pipe_setup()
515 const struct cred *old_cred; in do_coredump()
516 struct cred *cred; in do_coredump() local
544 cred = prepare_creds(); in do_coredump()
545 if (!cred) in do_coredump()
555 cred->fsuid = GLOBAL_ROOT_UID; /* Dump root private */ in do_coredump()
563 old_cred = override_creds(cred); in do_coredump()
[all …]
Dfcntl.c93 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()
435 const struct cred *cred; in sigio_perm() local
439 cred = __task_cred(p); in sigio_perm()
441 uid_eq(fown->euid, cred->suid) || uid_eq(fown->euid, cred->uid) || in sigio_perm()
442 uid_eq(fown->uid, cred->suid) || uid_eq(fown->uid, cred->uid)) && in sigio_perm()
Dopen.c339 const struct cred *old_cred; in SYSCALL_DEFINE3()
340 struct cred *override_cred; in SYSCALL_DEFINE3()
685 const struct cred *cred) in do_dentry_open() argument
725 error = security_file_open(f, cred); in do_dentry_open()
841 const struct cred *cred) in vfs_open() argument
849 return do_dentry_open(file, inode, NULL, cred); in vfs_open()
853 const struct cred *cred) in dentry_open() argument
858 validate_creds(cred); in dentry_open()
866 error = vfs_open(path, f, cred); in dentry_open()
Dbinfmt_elf_fdpic.c498 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()
Dexec.c1153 if (!uid_eq(bprm->cred->uid, current_euid()) || in setup_new_exec()
1154 !gid_eq(bprm->cred->gid, current_egid())) { in setup_new_exec()
1181 bprm->cred = prepare_exec_creds(); in prepare_bprm_creds()
1182 if (likely(bprm->cred)) in prepare_bprm_creds()
1192 if (bprm->cred) { in free_bprm()
1194 abort_creds(bprm->cred); in free_bprm()
1225 commit_creds(bprm->cred); in install_exec_creds()
1226 bprm->cred = NULL; in install_exec_creds()
1295 bprm->cred->euid = current_euid(); in bprm_fill_uid()
1296 bprm->cred->egid = current_egid(); in bprm_fill_uid()
[all …]
Dfile_table.c105 const struct cred *cred = current_cred(); in get_empty_filp() local
127 f->f_cred = get_cred(cred); in get_empty_filp()
Dbinfmt_elf.c169 const struct cred *cred = current_cred(); in create_elf_tables() local
244 NEW_AUX_ENT(AT_UID, from_kuid_munged(cred->user_ns, cred->uid)); in create_elf_tables()
245 NEW_AUX_ENT(AT_EUID, from_kuid_munged(cred->user_ns, cred->euid)); in create_elf_tables()
246 NEW_AUX_ENT(AT_GID, from_kgid_munged(cred->user_ns, cred->gid)); in create_elf_tables()
247 NEW_AUX_ENT(AT_EGID, from_kgid_munged(cred->user_ns, cred->egid)); in create_elf_tables()
1439 const struct cred *cred; in fill_psinfo() local
1470 cred = __task_cred(p); in fill_psinfo()
1471 SET_UID(psinfo->pr_uid, from_kuid_munged(cred->user_ns, cred->uid)); in fill_psinfo()
1472 SET_GID(psinfo->pr_gid, from_kgid_munged(cred->user_ns, cred->gid)); in fill_psinfo()
Dinternal.h110 extern int vfs_open(const struct path *, struct file *, const struct cred *);
Dbinfmt_flat.c827 bprm.cred = prepare_exec_creds(); in load_flat_shared_library()
829 if (!bprm.cred) in load_flat_shared_library()
843 abort_creds(bprm.cred); in load_flat_shared_library()
/linux-4.4.14/fs/cachefiles/
Dsecurity.c22 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()
Dinterface.c122 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()
Dinternal.h63 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()
Ddaemon.c556 const struct cred *saved_cred; in cachefiles_daemon_cull()
628 const struct cred *saved_cred; in cachefiles_daemon_inuse()
Dbind.c90 const struct cred *saved_cred; in cachefiles_daemon_add_cache()
/linux-4.4.14/drivers/misc/vmw_vmci/
Dvmci_context.h88 const struct cred *cred; member
136 const struct cred *cred);
Dvmci_context.c87 const struct cred *cred) in vmci_ctx_create() argument
149 if (cred) in vmci_ctx_create()
150 context->cred = get_cred(cred); in vmci_ctx_create()
482 if (context->cred) in ctx_free_ctx()
483 put_cred(context->cred); in ctx_free_ctx()
1206 if (context->cred) in vmci_is_context_owner()
1207 is_owner = uid_eq(context->cred->uid, uid); in vmci_is_context_owner()
Dvmci_host.c299 const struct cred *cred; in vmci_host_do_init_context() local
321 cred = get_current_cred(); in vmci_host_do_init_context()
325 cred); in vmci_host_do_init_context()
326 put_cred(cred); in vmci_host_do_init_context()
/linux-4.4.14/arch/mips/kernel/
Dmips-mt-fpaff.c48 const struct cred *cred = current_cred(), *pcred; in check_same_owner() local
53 match = (uid_eq(cred->euid, pcred->euid) || in check_same_owner()
54 uid_eq(cred->euid, pcred->uid)); in check_same_owner()
/linux-4.4.14/security/apparmor/include/
Dcontext.h97 static inline struct aa_profile *aa_cred_profile(const struct cred *cred) in aa_cred_profile() argument
99 struct aa_task_cxt *cxt = cred_cxt(cred); in aa_cred_profile()
/linux-4.4.14/security/integrity/
Ddigsig.c68 const struct cred *cred = current_cred(); in integrity_init_keyring() local
72 KGIDT_INIT(0), cred, in integrity_init_keyring()
/linux-4.4.14/net/netfilter/
Dnf_log_common.c142 const struct cred *cred = sk->sk_socket->file->f_cred; in nf_log_dump_sk_uid_gid() local
144 from_kuid_munged(&init_user_ns, cred->fsuid), in nf_log_dump_sk_uid_gid()
145 from_kgid_munged(&init_user_ns, cred->fsgid)); in nf_log_dump_sk_uid_gid()
Dnfnetlink_queue.c258 const struct cred *cred; in nfqnl_put_sk_uidgid() local
265 cred = sk->sk_socket->file->f_cred; in nfqnl_put_sk_uidgid()
267 htonl(from_kuid_munged(&init_user_ns, cred->fsuid)))) in nfqnl_put_sk_uidgid()
270 htonl(from_kgid_munged(&init_user_ns, cred->fsgid)))) in nfqnl_put_sk_uidgid()
Dnfnetlink_log.c558 const struct cred *cred = file->f_cred; in __build_packet_message() local
560 __be32 uid = htonl(from_kuid_munged(user_ns, cred->fsuid)); in __build_packet_message()
561 __be32 gid = htonl(from_kgid_munged(user_ns, cred->fsgid)); in __build_packet_message()
/linux-4.4.14/block/
Dioprio.c36 const struct cred *cred = current_cred(), *tcred; in set_task_ioprio() local
40 if (!uid_eq(tcred->uid, cred->euid) && in set_task_ioprio()
41 !uid_eq(tcred->uid, cred->uid) && !capable(CAP_SYS_NICE)) { in set_task_ioprio()
/linux-4.4.14/Documentation/security/
Dcredentials.txt278 (groups, keys, LSM security) a refcounted structure of type 'struct cred'.
279 Each task points to its credentials by a pointer called 'cred' in its
300 To alter anything in the cred struct, the copy-and-replace principle must be
338 const struct cred *current_cred()
370 const struct cred *get_current_cred(void);
373 actually live in struct cred:
394 const struct cred *__task_cred(struct task_struct *task);
400 const struct cred *tcred;
415 const struct cred *get_task_cred(struct task_struct *task);
445 where 'member' is a non-pointer member of the cred struct. For instance:
[all …]
Dkeys.txt1000 const struct cred *cred,
/linux-4.4.14/drivers/connector/
Dcn_proc.c129 const struct cred *cred; in proc_id_connector() local
141 cred = __task_cred(task); in proc_id_connector()
143 ev->event_data.id.r.ruid = from_kuid_munged(&init_user_ns, cred->uid); in proc_id_connector()
144 ev->event_data.id.e.euid = from_kuid_munged(&init_user_ns, cred->euid); in proc_id_connector()
146 ev->event_data.id.r.rgid = from_kgid_munged(&init_user_ns, cred->gid); in proc_id_connector()
147 ev->event_data.id.e.egid = from_kgid_munged(&init_user_ns, cred->egid); in proc_id_connector()
/linux-4.4.14/fs/ecryptfs/
Dkthread.c134 const struct cred *cred) in ecryptfs_privileged_open() argument
149 (*lower_file) = dentry_open(&req.path, flags, cred); in ecryptfs_privileged_open()
Dmain.c122 const struct cred *cred = current_cred(); in ecryptfs_init_lower_file() local
127 cred); in ecryptfs_init_lower_file()
Decryptfs_kernel.h702 const struct cred *cred);
/linux-4.4.14/security/smack/
Dsmack_lsm.c223 static int smk_bu_credfile(const struct cred *cred, struct file *file, in smk_bu_credfile() argument
226 struct task_smack *tsp = cred->security; in smk_bu_credfile()
249 #define smk_bu_credfile(cred, file, mode, RC) (RC) argument
909 struct task_smack *bsp = bprm->cred->security; in smack_bprm_set_creds()
952 struct task_smack *bsp = bprm->cred->security; in smack_bprm_committing_creds()
1826 struct smack_known *tkp = smk_of_task(tsk->cred->security); in smack_file_send_sigiotask()
1892 static int smack_file_open(struct file *file, const struct cred *cred) in smack_file_open() argument
1894 struct task_smack *tsp = cred->security; in smack_file_open()
1905 rc = smk_bu_credfile(cred, file, MAY_READ, rc); in smack_file_open()
1923 static int smack_cred_alloc_blank(struct cred *cred, gfp_t gfp) in smack_cred_alloc_blank() argument
[all …]
/linux-4.4.14/fs/cifs/
Dcifsacl.c45 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 …]
/linux-4.4.14/fs/lockd/
Dclntproc.c249 nlmclnt_call(struct rpc_cred *cred, struct nlm_rqst *req, u32 proc) in nlmclnt_call() argument
258 .rpc_cred = cred, in nlmclnt_call()
394 static int nlmclnt_async_call(struct rpc_cred *cred, struct nlm_rqst *req, u32 proc, const struct r… in nlmclnt_async_call() argument
399 .rpc_cred = cred, in nlmclnt_async_call()
503 struct rpc_cred *cred = nfs_file_cred(fl->fl_file); in nlmclnt_lock() local
531 status = nlmclnt_call(cred, req, NLMPROC_LOCK); in nlmclnt_lock()
600 nlmclnt_async_call(cred, req, NLMPROC_UNLOCK, &nlmclnt_unlock_ops); in nlmclnt_lock()
/linux-4.4.14/security/integrity/ima/
Dima_policy.c215 const struct cred *cred = current_cred(); in ima_match_rules() local
233 if ((rule->flags & IMA_UID) && !uid_eq(rule->uid, cred->uid)) in ima_match_rules()
237 if (!uid_eq(rule->uid, cred->euid) in ima_match_rules()
238 && !uid_eq(rule->uid, cred->suid) in ima_match_rules()
239 && !uid_eq(rule->uid, cred->uid)) in ima_match_rules()
241 } else if (!uid_eq(rule->uid, cred->euid)) in ima_match_rules()
/linux-4.4.14/fs/exofs/
Dsuper.c225 static int exofs_read_kern(struct osd_dev *od, u8 *cred, struct osd_obj_id *obj, in exofs_read_kern() argument
242 ret = osd_finalize_request(or, 0, cred, NULL); in exofs_read_kern()
596 exofs_make_credential(comp.cred, &comp.obj); in exofs_read_lookup_dev_table()
598 ret = exofs_read_kern(fscb_od, comp.cred, &comp.obj, 0, dt, in exofs_read_lookup_dev_table()
676 ret = exofs_read_kern(od, comp.cred, &comp.obj, 0, &fscb, in exofs_read_lookup_dev_table()
747 exofs_make_credential(sbi->one_comp.cred, &sbi->one_comp.obj); in exofs_fill_super()
764 exofs_make_credential(comp.cred, &comp.obj); in exofs_fill_super()
766 ret = exofs_read_kern(od, comp.cred, &comp.obj, 0, &fscb, sizeof(fscb)); in exofs_fill_super()
Dexofs.h228 exofs_make_credential(one_comp->cred, &one_comp->obj); in exofs_init_comps()
Dore.c126 return ios->oc->comps[index & ios->oc->single_comp].cred; in _ios_cred()
/linux-4.4.14/drivers/usb/core/
Ddevio.c75 const struct cred *cred; member
86 const struct cred *cred; member
294 if (as->cred) in free_async()
295 put_cred(as->cred); in free_async()
496 const struct cred *cred = NULL; in async_completed() local
510 cred = get_cred(as->cred); in async_completed()
525 kill_pid_info_as_cred(sinfo.si_signo, &sinfo, pid, cred, secid); in async_completed()
527 put_cred(cred); in async_completed()
916 ps->cred = get_current_cred(); in usbdev_open()
958 put_cred(ps->cred); in usbdev_release()
[all …]
/linux-4.4.14/fs/overlayfs/
Ddir.c407 const struct cred *old_cred; in ovl_create_or_link()
408 struct cred *override_cred; in ovl_create_or_link()
660 const struct cred *old_cred; in ovl_do_remove()
661 struct cred *override_cred; in ovl_do_remove()
723 const struct cred *old_cred = NULL; in ovl_rename2()
724 struct cred *override_cred = NULL; in ovl_rename2()
Dcopy_up.c305 const struct cred *old_cred; in ovl_copy_up_one()
306 struct cred *override_cred; in ovl_copy_up_one()
Dreaddir.c207 const struct cred *old_cred; in ovl_check_whiteouts()
208 struct cred *override_cred; in ovl_check_whiteouts()
/linux-4.4.14/fs/exportfs/
Dexpfs.c272 const struct cred *cred = current_cred(); in get_name() local
305 file = dentry_open(path, O_RDONLY, cred); in get_name()
/linux-4.4.14/fs/nfs/objlayout/
Dobjio_osd.c166 WARN_ON(src_comp->oc_cap.cred_len > sizeof(ocomp->cred)); in copy_single_comp()
171 memcpy(ocomp->cred, src_comp->oc_cap.cred, sizeof(ocomp->cred)); in copy_single_comp()
Dpnfs_osd_xdr_cli.c87 opaque_cred->cred = p; in _osd_xdr_decode_opaque_cred()
311 opaque_cred->cred = p; in __read_opaque_cred()
/linux-4.4.14/fs/nfsd/
Dnfs4recover.c68 nfs4_save_creds(const struct cred **original_creds) in nfs4_save_creds()
70 struct cred *new; in nfs4_save_creds()
84 nfs4_reset_creds(const struct cred *original) in nfs4_reset_creds()
169 const struct cred *original_cred; in nfsd4_create_clid_dir()
269 const struct cred *original_cred; in nfsd4_list_rec_dir()
345 const struct cred *original_cred; in nfsd4_remove_clid_dir()
460 const struct cred *original_cred; in nfsd4_init_recdir()
Dnfs4callback.c748 struct rpc_cred *cred; in setup_callback_client() local
777 cred = get_backchannel_cred(clp, client, ses); in setup_callback_client()
778 if (IS_ERR(cred)) { in setup_callback_client()
780 return PTR_ERR(cred); in setup_callback_client()
783 clp->cl_cb_cred = cred; in setup_callback_client()
Dauth.c24 struct cred *new; in nfsd_setuser()
Dnfsfh.c211 struct cred *new = prepare_creds(); in nfsd_set_fh_dentry()
/linux-4.4.14/init/
Ddo_mounts_initrd.c36 static int init_linuxrc(struct subprocess_info *info, struct cred *new) in init_linuxrc()
/linux-4.4.14/drivers/misc/mic/cosm/
Dcosm_main.c76 const struct cred *orig_cred; in cosm_start()
77 struct cred *override_cred; in cosm_start()
/linux-4.4.14/mm/
Dmigrate.c1484 const struct cred *cred = current_cred(), *tcred; in SYSCALL_DEFINE6() local
1513 if (!uid_eq(cred->euid, tcred->suid) && !uid_eq(cred->euid, tcred->uid) && in SYSCALL_DEFINE6()
1514 !uid_eq(cred->uid, tcred->suid) && !uid_eq(cred->uid, tcred->uid) && in SYSCALL_DEFINE6()
Dmempolicy.c1343 const struct cred *cred = current_cred(), *tcred; in SYSCALL_DEFINE4() local
1385 if (!uid_eq(cred->euid, tcred->suid) && !uid_eq(cred->euid, tcred->uid) && in SYSCALL_DEFINE4()
1386 !uid_eq(cred->uid, tcred->suid) && !uid_eq(cred->uid, tcred->uid) && in SYSCALL_DEFINE4()
/linux-4.4.14/net/rxrpc/
Dar-key.c967 const struct cred *cred = current_cred(); in rxrpc_get_server_data_key() local
979 GLOBAL_ROOT_UID, GLOBAL_ROOT_GID, cred, 0, in rxrpc_get_server_data_key()
1021 const struct cred *cred = current_cred(); in rxrpc_get_null_key() local
1026 GLOBAL_ROOT_UID, GLOBAL_ROOT_GID, cred, in rxrpc_get_null_key()
/linux-4.4.14/fs/fuse/
Ddir.c1015 const struct cred *cred; in fuse_allow_current_process() local
1020 cred = current_cred(); in fuse_allow_current_process()
1021 if (uid_eq(cred->euid, fc->user_id) && in fuse_allow_current_process()
1022 uid_eq(cred->suid, fc->user_id) && in fuse_allow_current_process()
1023 uid_eq(cred->uid, fc->user_id) && in fuse_allow_current_process()
1024 gid_eq(cred->egid, fc->group_id) && in fuse_allow_current_process()
1025 gid_eq(cred->sgid, fc->group_id) && in fuse_allow_current_process()
1026 gid_eq(cred->gid, fc->group_id)) in fuse_allow_current_process()
/linux-4.4.14/include/scsi/
Dosd_ore.h33 u8 cred[OSD_CAP_LEN]; member
/linux-4.4.14/include/net/
Daf_vsock.h49 const struct cred *owner;
Dsock.h432 const struct cred *sk_peer_cred;
/linux-4.4.14/drivers/block/
Dosdblk.c165 void *caller_context, u8 *cred) in osd_async_op() argument
169 ret = osd_finalize_request(or, 0, cred, NULL); in osd_async_op()
/linux-4.4.14/lib/
Dvsprintf.c1571 const struct cred *cred = current_cred(); in pointer() local
1574 !uid_eq(cred->euid, cred->uid) || in pointer()
1575 !gid_eq(cred->egid, cred->gid)) in pointer()
DKconfig.debug1193 pointers from task_structs to any given cred struct, and checks to
1194 see that this number never exceeds the usage count of the cred
1198 security pointer in the cred struct is never seen to be invalid.
/linux-4.4.14/drivers/net/ethernet/chelsio/cxgb4vf/
Dsge.c610 unsigned int cred = fl->avail; in refill_fl() local
709 cred = fl->avail - cred; in refill_fl()
710 fl->pend_cred += cred; in refill_fl()
718 return cred; in refill_fl()
/linux-4.4.14/ipc/
Dmqueue.c728 const struct cred *cred = current_cred(); in do_create() local
754 return dentry_open(path, oflag, cred); in do_create()
/linux-4.4.14/fs/xfs/
Dxfs_ioctl.c198 const struct cred *cred = current_cred(); in xfs_open_by_handle() local
253 filp = dentry_open(&path, hreq->oflags, cred); in xfs_open_by_handle()
/linux-4.4.14/fs/nfs/filelayout/
Dfilelayout.c506 nfs_initiate_pgio(ds_clnt, hdr, hdr->cred, in filelayout_read_pagelist()
548 nfs_initiate_pgio(ds_clnt, hdr, hdr->cred, in filelayout_write_pagelist()
/linux-4.4.14/drivers/net/ethernet/chelsio/cxgb4/
Dsge.c585 unsigned int cred = q->avail; in refill_fl() local
660 out: cred = q->avail - cred; in refill_fl()
661 q->pend_cred += cred; in refill_fl()
670 return cred; in refill_fl()
/linux-4.4.14/drivers/net/
Dtun.c472 const struct cred *cred = current_cred(); in tun_not_capable() local
475 return ((uid_valid(tun->owner) && !uid_eq(cred->euid, tun->owner)) || in tun_not_capable()
/linux-4.4.14/Documentation/filesystems/caching/
Dcachefiles.txt410 its own task_security structure, and redirects current->cred to point to it
432 objective security (task->real_cred) and the subjective security (task->cred).
/linux-4.4.14/Documentation/filesystems/
Dcoda.txt391 struct CodaCred cred; /* Common to all */
1492 struct CodaCred cred;
1545 struct CodaCred cred;
1551 DDeessccrriippttiioonn Remove all entries in the cache carrying the cred and VFid
DLocking70 int (*dentry_open)(struct dentry *, struct file *, const struct cred *);
Dvfs.txt367 int (*dentry_open)(struct dentry *, struct file *, const struct cred *);
/linux-4.4.14/kernel/sched/
Dcore.c3760 const struct cred *cred = current_cred(), *pcred; in check_same_owner() local
3765 match = (uid_eq(cred->euid, pcred->euid) || in check_same_owner()
3766 uid_eq(cred->euid, pcred->uid)); in check_same_owner()
/linux-4.4.14/arch/ia64/kernel/
Dperfmon.c2361 const struct cred *tcred; in pfm_bad_permissions()