/kernel/ |
D | cred.c | 43 struct cred init_cred = { 68 static inline void set_cred_subscribers(struct cred *cred, int n) in set_cred_subscribers() argument 71 atomic_set(&cred->subscribers, n); in set_cred_subscribers() 75 static inline int read_cred_subscribers(const struct cred *cred) in read_cred_subscribers() argument 78 return atomic_read(&cred->subscribers); in read_cred_subscribers() 84 static inline void alter_cred_subscribers(const struct cred *_cred, int n) in alter_cred_subscribers() 87 struct cred *cred = (struct cred *) _cred; in alter_cred_subscribers() local 89 atomic_add(n, &cred->subscribers); in alter_cred_subscribers() 98 struct cred *cred = container_of(rcu, struct cred, rcu); in put_cred_rcu() local 100 kdebug("put_cred_rcu(%p)", cred); in put_cred_rcu() [all …]
|
D | uid16.c | 66 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 …]
|
D | groups.c | 118 void set_groups(struct cred *new, struct group_info *group_info) in set_groups() 136 struct cred *new; in set_current_groups() 137 const struct cred *old; in set_current_groups() 163 const struct cred *cred = current_cred(); in SYSCALL_DEFINE2() local 170 i = cred->group_info->ngroups; in SYSCALL_DEFINE2() 176 if (groups_to_user(grouplist, cred->group_info)) { in SYSCALL_DEFINE2() 229 const struct cred *cred = current_cred(); in in_group_p() local 232 if (!gid_eq(grp, cred->fsgid)) in in_group_p() 233 retval = groups_search(cred->group_info, grp); in in_group_p() 241 const struct cred *cred = current_cred(); in in_egroup_p() local [all …]
|
D | user_namespace.c | 43 static void set_cred_user_ns(struct cred *cred, struct user_namespace *user_ns) in set_cred_user_ns() argument 48 cred->securebits = SECUREBITS_DEFAULT; in set_cred_user_ns() 49 cred->cap_inheritable = CAP_EMPTY_SET; in set_cred_user_ns() 50 cred->cap_permitted = CAP_FULL_SET; in set_cred_user_ns() 51 cred->cap_effective = CAP_FULL_SET; in set_cred_user_ns() 52 cred->cap_ambient = CAP_EMPTY_SET; in set_cred_user_ns() 53 cred->cap_bset = CAP_FULL_SET; in set_cred_user_ns() 55 key_put(cred->request_key_auth); in set_cred_user_ns() 56 cred->request_key_auth = NULL; in set_cred_user_ns() 59 cred->user_ns = user_ns; in set_cred_user_ns() [all …]
|
D | auditsc.c | 378 const struct cred *cred, in audit_field_compare() argument 386 return audit_compare_uid(cred->uid, name, f, ctx); in audit_field_compare() 388 return audit_compare_gid(cred->gid, name, f, ctx); in audit_field_compare() 390 return audit_compare_uid(cred->euid, name, f, ctx); in audit_field_compare() 392 return audit_compare_gid(cred->egid, name, f, ctx); in audit_field_compare() 396 return audit_compare_uid(cred->suid, name, f, ctx); in audit_field_compare() 398 return audit_compare_gid(cred->sgid, name, f, ctx); in audit_field_compare() 400 return audit_compare_uid(cred->fsuid, name, f, ctx); in audit_field_compare() 402 return audit_compare_gid(cred->fsgid, name, f, ctx); in audit_field_compare() 405 return audit_uid_comparator(cred->uid, f->op, in audit_field_compare() [all …]
|
D | sys.c | 175 const struct cred *cred = current_cred(), *pcred = __task_cred(p); in set_one_prio_perm() local 177 if (uid_eq(pcred->uid, cred->euid) || in set_one_prio_perm() 178 uid_eq(pcred->euid, cred->euid)) in set_one_prio_perm() 217 const struct cred *cred = current_cred(); in SYSCALL_DEFINE3() local 254 uid = make_kuid(cred->user_ns, who); in SYSCALL_DEFINE3() 255 user = cred->user; in SYSCALL_DEFINE3() 257 uid = cred->uid; in SYSCALL_DEFINE3() 258 else if (!uid_eq(uid, cred->uid)) { in SYSCALL_DEFINE3() 267 if (!uid_eq(uid, cred->uid)) in SYSCALL_DEFINE3() 287 const struct cred *cred = current_cred(); in SYSCALL_DEFINE2() local [all …]
|
D | watch_queue.c | 197 const struct cred *cred, in __post_watch_notification() argument 222 if (security_post_notification(watch->cred, cred, n) < 0) in __post_watch_notification() 420 atomic_dec(&watch->cred->user->nr_watches); in free_watch() 421 put_cred(watch->cred); in free_watch() 457 const struct cred *cred; in add_one_watch() local 466 cred = current_cred(); in add_one_watch() 467 if (atomic_inc_return(&cred->user->nr_watches) > task_rlimit(current, RLIMIT_NOFILE)) { in add_one_watch() 468 atomic_dec(&cred->user->nr_watches); in add_one_watch() 472 watch->cred = get_cred(cred); in add_one_watch()
|
D | capability.c | 227 struct cred *new; in SYSCALL_DEFINE2() 526 const struct cred *cred; in ptracer_capable() local 529 cred = rcu_dereference(tsk->ptracer_cred); in ptracer_capable() 530 if (cred) in ptracer_capable() 531 ret = security_capable(cred, ns, CAP_SYS_PTRACE, in ptracer_capable()
|
D | audit.c | 1601 const struct cred *cred; in audit_log_multicast() local 1613 cred = current_cred(); in audit_log_multicast() 1617 from_kuid(&init_user_ns, cred->uid), in audit_log_multicast() 2248 const struct cred *cred; in audit_log_task_info() local 2255 cred = current_cred(); in audit_log_task_info() 2264 from_kuid(&init_user_ns, cred->uid), in audit_log_task_info() 2265 from_kgid(&init_user_ns, cred->gid), in audit_log_task_info() 2266 from_kuid(&init_user_ns, cred->euid), in audit_log_task_info() 2267 from_kuid(&init_user_ns, cred->suid), in audit_log_task_info() 2268 from_kuid(&init_user_ns, cred->fsuid), in audit_log_task_info() [all …]
|
D | nsproxy.c | 212 struct nsproxy **new_nsp, struct cred *new_cred, struct fs_struct *new_fs) in unshare_nsproxy_namespaces() 321 nsset->cred = prepare_creds(); in prepare_nsset() 323 nsset->cred = current_cred(); in prepare_nsset() 324 if (!nsset->cred) in prepare_nsset() 502 nsset->cred = NULL; in commit_nsset()
|
D | ptrace.c | 69 const struct cred *ptracer_cred) in __ptrace_link() 118 const struct cred *old_cred; in __ptrace_unlink() 288 const struct cred *cred = current_cred(), *tcred; in __ptrace_may_access() local 312 caller_uid = cred->fsuid; in __ptrace_may_access() 313 caller_gid = cred->fsgid; in __ptrace_may_access() 323 caller_uid = cred->uid; in __ptrace_may_access() 324 caller_gid = cred->gid; in __ptrace_may_access()
|
D | signal.c | 828 const struct cred *cred = current_cred(); in kill_ok_by_cred() local 829 const struct cred *tcred = __task_cred(t); in kill_ok_by_cred() 831 return uid_eq(cred->euid, tcred->suid) || in kill_ok_by_cred() 832 uid_eq(cred->euid, tcred->uid) || in kill_ok_by_cred() 833 uid_eq(cred->uid, tcred->suid) || in kill_ok_by_cred() 834 uid_eq(cred->uid, tcred->uid) || in kill_ok_by_cred() 1522 static inline bool kill_as_cred_perm(const struct cred *cred, in kill_as_cred_perm() argument 1525 const struct cred *pcred = __task_cred(target); in kill_as_cred_perm() 1527 return uid_eq(cred->euid, pcred->suid) || in kill_as_cred_perm() 1528 uid_eq(cred->euid, pcred->uid) || in kill_as_cred_perm() [all …]
|
D | umh.c | 70 struct cred *new; in call_usermodehelper_exec_async() 361 int (*init)(struct subprocess_info *info, struct cred *new), in call_usermodehelper_setup()
|
D | kallsyms.c | 979 bool kallsyms_show_value(const struct cred *cred) in kallsyms_show_value() argument 987 if (security_capable(cred, &init_user_ns, CAP_SYSLOG, in kallsyms_show_value()
|
D | utsname.c | 146 !ns_capable(nsset->cred->user_ns, CAP_SYS_ADMIN)) in utsns_install()
|
D | usermode_driver.c | 96 static int umd_setup(struct subprocess_info *info, struct cred *new) in umd_setup()
|
D | tsacct.c | 24 const struct cred *tcred; in bacct_add_tsk()
|
D | Makefile | 12 notifier.o ksysfs.o cred.o reboot.o \
|
D | pid_namespace.c | 399 !ns_capable(nsset->cred->user_ns, CAP_SYS_ADMIN)) in pidns_install()
|
D | acct.c | 496 const struct cred *orig_cred; in do_acct_process()
|
/kernel/trace/ |
D | trace_events_user.c | 790 const struct cred *old_cred; in user_event_set_call_visible() 791 struct cred *cred; in user_event_set_call_visible() local 793 cred = prepare_creds(); in user_event_set_call_visible() 795 if (!cred) in user_event_set_call_visible() 807 cred->fsuid = GLOBAL_ROOT_UID; in user_event_set_call_visible() 809 old_cred = override_creds(cred); in user_event_set_call_visible() 817 put_cred(cred); in user_event_set_call_visible()
|
/kernel/cgroup/ |
D | cgroup-v1.c | 495 const struct cred *cred, *tcred; in __cgroup1_procs_write() local 513 cred = of->file->f_cred; in __cgroup1_procs_write() 515 if (!uid_eq(cred->euid, GLOBAL_ROOT_UID) && in __cgroup1_procs_write() 516 !uid_eq(cred->euid, tcred->uid) && in __cgroup1_procs_write() 517 !uid_eq(cred->euid, tcred->suid) && in __cgroup1_procs_write()
|
D | namespace.c | 103 if (!ns_capable(nsset->cred->user_ns, CAP_SYS_ADMIN) || in cgroupns_install()
|
/kernel/time/ |
D | namespace.c | 295 !ns_capable(nsset->cred->user_ns, CAP_SYS_ADMIN)) in timens_install()
|
/kernel/sched/ |
D | core.c | 7581 const struct cred *cred = current_cred(), *pcred; in check_same_owner() local 7586 match = (uid_eq(cred->euid, pcred->euid) || in check_same_owner() 7587 uid_eq(cred->euid, pcred->uid)); in check_same_owner()
|