Home
last modified time | relevance | path

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

12

/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.c66 const struct cred *cred = current_cred(); in SYSCALL_DEFINE3() local
70 ruid = high2lowuid(from_kuid_munged(cred->user_ns, cred->uid)); in SYSCALL_DEFINE3()
71 euid = high2lowuid(from_kuid_munged(cred->user_ns, cred->euid)); in SYSCALL_DEFINE3()
72 suid = high2lowuid(from_kuid_munged(cred->user_ns, cred->suid)); in SYSCALL_DEFINE3()
89 const struct cred *cred = current_cred(); in SYSCALL_DEFINE3() local
93 rgid = high2lowgid(from_kgid_munged(cred->user_ns, cred->gid)); in SYSCALL_DEFINE3()
94 egid = high2lowgid(from_kgid_munged(cred->user_ns, cred->egid)); in SYSCALL_DEFINE3()
95 sgid = high2lowgid(from_kgid_munged(cred->user_ns, cred->sgid)); in SYSCALL_DEFINE3()
156 const struct cred *cred = current_cred(); in SYSCALL_DEFINE2() local
162 i = cred->group_info->ngroups; in SYSCALL_DEFINE2()
[all …]
Dgroups.c123 void set_groups(struct cred *new, struct group_info *group_info) in set_groups()
141 struct cred *new; in set_current_groups()
155 const struct cred *cred = current_cred(); in SYSCALL_DEFINE2() local
162 i = cred->group_info->ngroups; in SYSCALL_DEFINE2()
168 if (groups_to_user(grouplist, cred->group_info)) { in SYSCALL_DEFINE2()
221 const struct cred *cred = current_cred(); in in_group_p() local
224 if (!gid_eq(grp, cred->fsgid)) in in_group_p()
225 retval = groups_search(cred->group_info, grp); in in_group_p()
233 const struct cred *cred = current_cred(); in in_egroup_p() local
236 if (!gid_eq(grp, cred->egid)) in in_egroup_p()
[all …]
Duser_namespace.c42 static void set_cred_user_ns(struct cred *cred, struct user_namespace *user_ns) in set_cred_user_ns() argument
47 cred->securebits = SECUREBITS_DEFAULT; in set_cred_user_ns()
48 cred->cap_inheritable = CAP_EMPTY_SET; in set_cred_user_ns()
49 cred->cap_permitted = CAP_FULL_SET; in set_cred_user_ns()
50 cred->cap_effective = CAP_FULL_SET; in set_cred_user_ns()
51 cred->cap_ambient = CAP_EMPTY_SET; in set_cred_user_ns()
52 cred->cap_bset = CAP_FULL_SET; in set_cred_user_ns()
54 key_put(cred->request_key_auth); in set_cred_user_ns()
55 cred->request_key_auth = NULL; in set_cred_user_ns()
58 cred->user_ns = user_ns; in set_cred_user_ns()
[all …]
Dsys.c169 const struct cred *cred = current_cred(), *pcred = __task_cred(p); in set_one_prio_perm() local
171 if (uid_eq(pcred->uid, cred->euid) || in set_one_prio_perm()
172 uid_eq(pcred->euid, cred->euid)) in set_one_prio_perm()
211 const struct cred *cred = current_cred(); in SYSCALL_DEFINE3() local
247 uid = make_kuid(cred->user_ns, who); in SYSCALL_DEFINE3()
248 user = cred->user; in SYSCALL_DEFINE3()
250 uid = cred->uid; in SYSCALL_DEFINE3()
251 else if (!uid_eq(uid, cred->uid)) { in SYSCALL_DEFINE3()
260 if (!uid_eq(uid, cred->uid)) in SYSCALL_DEFINE3()
281 const struct cred *cred = current_cred(); in SYSCALL_DEFINE2() local
[all …]
Dauditsc.c384 const struct cred *cred, in audit_field_compare() argument
392 return audit_compare_uid(cred->uid, name, f, ctx); in audit_field_compare()
394 return audit_compare_gid(cred->gid, name, f, ctx); in audit_field_compare()
396 return audit_compare_uid(cred->euid, name, f, ctx); in audit_field_compare()
398 return audit_compare_gid(cred->egid, name, f, ctx); in audit_field_compare()
402 return audit_compare_uid(cred->suid, name, f, ctx); in audit_field_compare()
404 return audit_compare_gid(cred->sgid, name, f, ctx); in audit_field_compare()
406 return audit_compare_uid(cred->fsuid, name, f, ctx); in audit_field_compare()
408 return audit_compare_gid(cred->fsgid, name, f, ctx); in audit_field_compare()
411 return audit_uid_comparator(cred->uid, f->op, in audit_field_compare()
[all …]
Dwatch_queue.c200 const struct cred *cred, in __post_watch_notification() argument
225 if (security_post_notification(watch->cred, cred, n) < 0) in __post_watch_notification()
426 atomic_dec(&watch->cred->user->nr_watches); in free_watch()
427 put_cred(watch->cred); in free_watch()
463 const struct cred *cred; in add_one_watch() local
472 cred = current_cred(); in add_one_watch()
473 if (atomic_inc_return(&cred->user->nr_watches) > task_rlimit(current, RLIMIT_NOFILE)) { in add_one_watch()
474 atomic_dec(&cred->user->nr_watches); in add_one_watch()
478 watch->cred = get_cred(cred); in add_one_watch()
Dcapability.c227 struct cred *new; in SYSCALL_DEFINE2()
521 const struct cred *cred; in ptracer_capable() local
524 cred = rcu_dereference(tsk->ptracer_cred); in ptracer_capable()
525 if (cred) in ptracer_capable()
526 ret = security_capable(cred, ns, CAP_SYS_PTRACE, in ptracer_capable()
Daudit.c1603 const struct cred *cred; in audit_log_multicast() local
1615 cred = current_cred(); in audit_log_multicast()
1619 from_kuid(&init_user_ns, cred->uid), in audit_log_multicast()
2247 const struct cred *cred; in audit_log_task_info() local
2254 cred = current_cred(); in audit_log_task_info()
2263 from_kuid(&init_user_ns, cred->uid), in audit_log_task_info()
2264 from_kgid(&init_user_ns, cred->gid), in audit_log_task_info()
2265 from_kuid(&init_user_ns, cred->euid), in audit_log_task_info()
2266 from_kuid(&init_user_ns, cred->suid), in audit_log_task_info()
2267 from_kuid(&init_user_ns, cred->fsuid), in audit_log_task_info()
[all …]
Dnsproxy.c217 struct nsproxy **new_nsp, struct cred *new_cred, struct fs_struct *new_fs) in unshare_nsproxy_namespaces()
326 nsset->cred = prepare_creds(); in prepare_nsset()
328 nsset->cred = current_cred(); in prepare_nsset()
329 if (!nsset->cred) in prepare_nsset()
507 nsset->cred = NULL; in commit_nsset()
Dptrace.c68 const struct cred *ptracer_cred) in __ptrace_link()
117 const struct cred *old_cred; in __ptrace_unlink()
293 const struct cred *cred = current_cred(), *tcred; in __ptrace_may_access() local
317 caller_uid = cred->fsuid; in __ptrace_may_access()
318 caller_gid = cred->fsgid; in __ptrace_may_access()
328 caller_uid = cred->uid; in __ptrace_may_access()
329 caller_gid = cred->gid; in __ptrace_may_access()
Dsignal.c817 const struct cred *cred = current_cred(); in kill_ok_by_cred() local
818 const struct cred *tcred = __task_cred(t); in kill_ok_by_cred()
820 return uid_eq(cred->euid, tcred->suid) || in kill_ok_by_cred()
821 uid_eq(cred->euid, tcred->uid) || in kill_ok_by_cred()
822 uid_eq(cred->uid, tcred->suid) || in kill_ok_by_cred()
823 uid_eq(cred->uid, tcred->uid) || in kill_ok_by_cred()
1482 static inline bool kill_as_cred_perm(const struct cred *cred, in kill_as_cred_perm() argument
1485 const struct cred *pcred = __task_cred(target); in kill_as_cred_perm()
1487 return uid_eq(cred->euid, pcred->suid) || in kill_as_cred_perm()
1488 uid_eq(cred->euid, pcred->uid) || in kill_as_cred_perm()
[all …]
Dkallsyms.c725 bool kallsyms_show_value(const struct cred *cred) in kallsyms_show_value() argument
733 if (security_capable(cred, &init_user_ns, CAP_SYSLOG, in kallsyms_show_value()
Dumh.c68 struct cred *new; in call_usermodehelper_exec_async()
358 int (*init)(struct subprocess_info *info, struct cred *new), in call_usermodehelper_setup()
Dutsname.c149 !ns_capable(nsset->cred->user_ns, CAP_SYS_ADMIN)) in utsns_install()
Dusermode_driver.c96 static int umd_setup(struct subprocess_info *info, struct cred *new) in umd_setup()
Dtsacct.c24 const struct cred *tcred; in bacct_add_tsk()
DMakefile12 notifier.o ksysfs.o cred.o reboot.o \
Dpid_namespace.c406 !ns_capable(nsset->cred->user_ns, CAP_SYS_ADMIN)) in pidns_install()
Dacct.c479 const struct cred *orig_cred; in do_acct_process()
Dfork.c2455 atomic_dec(&p->cred->user->processes); in copy_process()
3018 struct cred *new_cred = NULL; in ksys_unshare()
/kernel/cgroup/
Dcgroup-v1.c496 const struct cred *cred, *tcred; in __cgroup1_procs_write() local
514 cred = of->file->f_cred; in __cgroup1_procs_write()
516 if (!uid_eq(cred->euid, GLOBAL_ROOT_UID) && in __cgroup1_procs_write()
517 !uid_eq(cred->euid, tcred->uid) && in __cgroup1_procs_write()
518 !uid_eq(cred->euid, tcred->suid) && in __cgroup1_procs_write()
Dnamespace.c103 if (!ns_capable(nsset->cred->user_ns, CAP_SYS_ADMIN) || in cgroupns_install()
/kernel/time/
Dnamespace.c298 !ns_capable(nsset->cred->user_ns, CAP_SYS_ADMIN)) in timens_install()
/kernel/sched/
Dcore.c5455 const struct cred *cred = current_cred(), *pcred; in check_same_owner() local
5460 match = (uid_eq(cred->euid, pcred->euid) || in check_same_owner()
5461 uid_eq(cred->euid, pcred->uid)); in check_same_owner()

12