/kernel/ |
D | cred.c | 41 struct cred init_cred = { 65 static inline void set_cred_subscribers(struct cred *cred, int n) in set_cred_subscribers() argument 68 atomic_set(&cred->subscribers, n); in set_cred_subscribers() 72 static inline int read_cred_subscribers(const struct cred *cred) in read_cred_subscribers() argument 75 return atomic_read(&cred->subscribers); in read_cred_subscribers() 81 static inline void alter_cred_subscribers(const struct cred *_cred, int n) in alter_cred_subscribers() 84 struct cred *cred = (struct cred *) _cred; in alter_cred_subscribers() local 86 atomic_add(n, &cred->subscribers); in alter_cred_subscribers() 95 struct cred *cred = container_of(rcu, struct cred, rcu); in put_cred_rcu() local 97 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 | 123 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 …]
|
D | user_namespace.c | 42 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 …]
|
D | sys.c | 160 const struct cred *cred = current_cred(), *pcred = __task_cred(p); in set_one_prio_perm() local 162 if (uid_eq(pcred->uid, cred->euid) || in set_one_prio_perm() 163 uid_eq(pcred->euid, cred->euid)) in set_one_prio_perm() 202 const struct cred *cred = current_cred(); in SYSCALL_DEFINE3() local 238 uid = make_kuid(cred->user_ns, who); in SYSCALL_DEFINE3() 239 user = cred->user; in SYSCALL_DEFINE3() 241 uid = cred->uid; in SYSCALL_DEFINE3() 242 else if (!uid_eq(uid, cred->uid)) { in SYSCALL_DEFINE3() 251 if (!uid_eq(uid, cred->uid)) in SYSCALL_DEFINE3() 272 const struct cred *cred = current_cred(); in SYSCALL_DEFINE2() local [all …]
|
D | auditsc.c | 355 const struct cred *cred, in audit_field_compare() argument 363 return audit_compare_uid(cred->uid, name, f, ctx); in audit_field_compare() 365 return audit_compare_gid(cred->gid, name, f, ctx); in audit_field_compare() 367 return audit_compare_uid(cred->euid, name, f, ctx); in audit_field_compare() 369 return audit_compare_gid(cred->egid, name, f, ctx); in audit_field_compare() 373 return audit_compare_uid(cred->suid, name, f, ctx); in audit_field_compare() 375 return audit_compare_gid(cred->sgid, name, f, ctx); in audit_field_compare() 377 return audit_compare_uid(cred->fsuid, name, f, ctx); in audit_field_compare() 379 return audit_compare_gid(cred->fsgid, name, f, ctx); in audit_field_compare() 382 return audit_uid_comparator(cred->uid, f->op, in audit_field_compare() [all …]
|
D | capability.c | 227 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()
|
D | ptrace.c | 68 const struct cred *ptracer_cred) in __ptrace_link() 117 const struct cred *old_cred; in __ptrace_unlink() 267 static bool ptrace_has_cap(const struct cred *cred, struct user_namespace *ns, in ptrace_has_cap() argument 273 ret = security_capable(cred, ns, CAP_SYS_PTRACE, CAP_OPT_NOAUDIT); in ptrace_has_cap() 275 ret = security_capable(cred, ns, CAP_SYS_PTRACE, CAP_OPT_NONE); in ptrace_has_cap() 283 const struct cred *cred = current_cred(), *tcred; in __ptrace_may_access() local 307 caller_uid = cred->fsuid; in __ptrace_may_access() 308 caller_gid = cred->fsgid; in __ptrace_may_access() 318 caller_uid = cred->uid; in __ptrace_may_access() 319 caller_gid = cred->gid; in __ptrace_may_access() [all …]
|
D | audit.c | 2123 const struct cred *cred; in audit_log_task_info() local 2130 cred = current_cred(); in audit_log_task_info() 2139 from_kuid(&init_user_ns, cred->uid), in audit_log_task_info() 2140 from_kgid(&init_user_ns, cred->gid), in audit_log_task_info() 2141 from_kuid(&init_user_ns, cred->euid), in audit_log_task_info() 2142 from_kuid(&init_user_ns, cred->suid), in audit_log_task_info() 2143 from_kuid(&init_user_ns, cred->fsuid), in audit_log_task_info() 2144 from_kgid(&init_user_ns, cred->egid), in audit_log_task_info() 2145 from_kgid(&init_user_ns, cred->sgid), in audit_log_task_info() 2146 from_kgid(&init_user_ns, cred->fsgid), in audit_log_task_info()
|
D | umh.c | 71 struct cred *new; in call_usermodehelper_exec_async() 381 int (*init)(struct subprocess_info *info, struct cred *new), in call_usermodehelper_setup() 409 int (*init)(struct subprocess_info *info, struct cred *new), in call_usermodehelper_setup_file() 435 static int umh_pipe_setup(struct subprocess_info *info, struct cred *new) in umh_pipe_setup()
|
D | signal.c | 808 const struct cred *cred = current_cred(); in kill_ok_by_cred() local 809 const struct cred *tcred = __task_cred(t); in kill_ok_by_cred() 811 return uid_eq(cred->euid, tcred->suid) || in kill_ok_by_cred() 812 uid_eq(cred->euid, tcred->uid) || in kill_ok_by_cred() 813 uid_eq(cred->uid, tcred->suid) || in kill_ok_by_cred() 814 uid_eq(cred->uid, tcred->uid) || in kill_ok_by_cred() 1464 static inline bool kill_as_cred_perm(const struct cred *cred, in kill_as_cred_perm() argument 1467 const struct cred *pcred = __task_cred(target); in kill_as_cred_perm() 1469 return uid_eq(cred->euid, pcred->suid) || in kill_as_cred_perm() 1470 uid_eq(cred->euid, pcred->uid) || in kill_as_cred_perm() [all …]
|
D | tsacct.c | 24 const struct cred *tcred; in bacct_add_tsk()
|
D | nsproxy.c | 189 struct nsproxy **new_nsp, struct cred *new_cred, struct fs_struct *new_fs) in unshare_nsproxy_namespaces()
|
D | Makefile | 12 notifier.o ksysfs.o cred.o reboot.o \
|
D | acct.c | 475 const struct cred *orig_cred; in do_acct_process()
|
D | fork.c | 2290 atomic_dec(&p->cred->user->processes); in copy_process() 2827 struct cred *new_cred = NULL; in ksys_unshare()
|
/kernel/cgroup/ |
D | cgroup-v1.c | 496 const struct cred *cred, *tcred; in __cgroup1_procs_write() local 512 cred = current_cred(); in __cgroup1_procs_write() 514 if (!uid_eq(cred->euid, GLOBAL_ROOT_UID) && in __cgroup1_procs_write() 515 !uid_eq(cred->euid, tcred->uid) && in __cgroup1_procs_write() 516 !uid_eq(cred->euid, tcred->suid) && in __cgroup1_procs_write()
|
/kernel/sched/ |
D | core.c | 4740 const struct cred *cred = current_cred(), *pcred; in check_same_owner() local 4745 match = (uid_eq(cred->euid, pcred->euid) || in check_same_owner() 4746 uid_eq(cred->euid, pcred->uid)); in check_same_owner()
|