Home
last modified time | relevance | path

Searched refs:p_ucred (Results 1 – 25 of 91) sorted by relevance

1234

/dragonfly/sys/vfs/procfs/
H A Dprocfs_status.c143 cr = p->p_ucred; in procfs_dostatus()
147 (u_long)p->p_ucred->cr_ruid, in procfs_dostatus()
148 (u_long)p->p_ucred->cr_rgid); in procfs_dostatus()
160 if (p->p_ucred->cr_prison) in procfs_dostatus()
162 " %s", p->p_ucred->cr_prison->pr_host); in procfs_dostatus()
205 !p_trespass(curp->p_ucred, p->p_ucred)) in procfs_docmdline()
222 !p_trespass(curp->p_ucred, p->p_ucred)) in procfs_docmdline()
239 !p_trespass(curp->p_ucred, p->p_ucred)) in procfs_docmdline()
H A Dprocfs.h95 ((((p1)->p_ucred->cr_uid == (p2)->p_ucred->cr_ruid) && \
96 ((p1)->p_ucred->cr_ruid == (p2)->p_ucred->cr_ruid) && \
97 ((p1)->p_ucred->cr_svuid == (p2)->p_ucred->cr_ruid) && \
99 (caps_priv_check((p1)->p_ucred, SYSCAP_NODEBUG_UNPRIV) == 0))
H A Dprocfs_vnops.c539 if (procp == NULL || procp->p_ucred == NULL) { in procfs_getattr()
604 if (procp->p_ucred) { in procfs_getattr()
605 vap->va_uid = procp->p_ucred->cr_uid; in procfs_getattr()
606 vap->va_gid = procp->p_ucred->cr_gid; in procfs_getattr()
673 else if (procp->p_ucred) in procfs_getattr()
674 vap->va_uid = procp->p_ucred->cr_uid; in procfs_getattr()
804 if (!PRISON_CHECK(ap->a_cnp->cn_cred, p->p_ucred)) in procfs_lookup()
943 if (!PRISON_CHECK(ap->a_cred, p->p_ucred)) { in procfs_readdir_proc()
1065 if (!PRISON_CHECK(info->cred, p->p_ucred)) in procfs_readdir_root_callback()
1069 info->cred->cr_uid != p->p_ucred->cr_uid) { in procfs_readdir_root_callback()
[all …]
H A Dprocfs_regs.c60 if (!CHECKIO(curp, p) || p_trespass(curp->p_ucred, p->p_ucred)) in procfs_doregs()
H A Dprocfs_fpregs.c59 if (!CHECKIO(curp, p) || p_trespass(curp->p_ucred, p->p_ucred)) in procfs_dofpregs()
H A Dprocfs_dbregs.c62 if (!CHECKIO(curp, p) || p_trespass(curp->p_ucred, p->p_ucred)) in procfs_dodbregs()
H A Dprocfs_mem.c189 } else if (!CHECKIO(curp, p) || p_trespass(curp->p_ucred, p->p_ucred)) { in procfs_domem()
/dragonfly/sys/kern/
H A Dkern_resource.c166 p->p_ucred->cr_uid == info->who && in getpriority_callback()
277 if (p->p_ucred->cr_uid == info->who && in setpriority_callback()
298 cr->cr_uid != chgp->p_ucred->cr_uid && in donice()
299 cr->cr_ruid != chgp->p_ucred->cr_uid) in donice()
407 p->p_ucred->cr_uid == info->who && in ioprio_get_callback()
519 if (p->p_ucred->cr_uid == info->who && in ioprio_set_callback()
537 cr->cr_ruid != chgp->p_ucred->cr_uid) in doionice()
614 cr->cr_uid != p->p_ucred->cr_uid && in sys_lwp_rtprio()
615 cr->cr_ruid != p->p_ucred->cr_uid) { in sys_lwp_rtprio()
712 cr->cr_uid != p->p_ucred->cr_uid && in sys_rtprio()
[all …]
H A Dkern_kinfo.c147 if (p->p_ucred) { in fill_kinfo_proc()
148 kp->kp_uid = p->p_ucred->cr_uid; in fill_kinfo_proc()
149 kp->kp_ngroups = p->p_ucred->cr_ngroups; in fill_kinfo_proc()
150 if (p->p_ucred->cr_groups) { in fill_kinfo_proc()
151 bcopy(p->p_ucred->cr_groups, kp->kp_groups, in fill_kinfo_proc()
154 kp->kp_ruid = p->p_ucred->cr_ruid; in fill_kinfo_proc()
155 kp->kp_svuid = p->p_ucred->cr_svuid; in fill_kinfo_proc()
156 kp->kp_rgid = p->p_ucred->cr_rgid; in fill_kinfo_proc()
157 kp->kp_svgid = p->p_ucred->cr_svgid; in fill_kinfo_proc()
211 if (p->p_ucred && jailed(p->p_ucred)) in fill_kinfo_proc()
[all …]
H A Dkern_caps.c102 cred = pp->p_ucred; in sys_syscap_get()
168 if (pp->p_ucred->cr_uid != curproc->p_ucred->cr_uid || in sys_syscap_set()
169 pp->p_ucred->cr_prison != curproc->p_ucred->cr_prison) in sys_syscap_set()
178 cred = pp->p_ucred; in sys_syscap_set()
241 cred = p->p_ucred; in caps_exec()
255 cred = p->p_ucred; in caps_exec()
H A Dkern_exec.c484 if ((((lva.va_mode & VSUID) && p->p_ucred->cr_uid != lva.va_uid) || in kern_execve()
485 ((lva.va_mode & VSGID) && p->p_ucred->cr_gid != lva.va_gid)) && in kern_execve()
518 p->p_ucred->cr_gid = lva.va_gid; in kern_execve()
523 if (p->p_ucred->cr_uid == p->p_ucred->cr_ruid && in kern_execve()
524 p->p_ucred->cr_gid == p->p_ucred->cr_rgid) in kern_execve()
531 if (p->p_ucred->cr_svuid != p->p_ucred->cr_uid || in kern_execve()
532 p->p_ucred->cr_svgid != p->p_ucred->cr_gid) { in kern_execve()
534 p->p_ucred->cr_svuid = p->p_ucred->cr_uid; in kern_execve()
535 p->p_ucred->cr_svgid = p->p_ucred->cr_gid; in kern_execve()
1317 error = VOP_EACCESS(vp, VEXEC, p->p_ucred); in exec_check_permissions()
[all …]
H A Dkern_acct.c252 acct.ac_uid = p->p_ucred->cr_ruid; in acct_process()
253 acct.ac_gid = p->p_ucred->cr_rgid; in acct_process()
277 (off_t)0, UIO_SYSSPACE, IO_APPEND|IO_UNIT, p->p_ucred, in acct_process()
340 (void)VFS_STATFS(savacctp->v_mount, &sb, proc0.p_ucred); in acctwatch()
354 (void)VFS_STATFS(acctp->v_mount, &sb, proc0.p_ucred); in acctwatch()
H A Dkern_p1003_1b.c75 (cr)->cr_ruid == (q)->p_ucred->cr_ruid || \
76 (cr)->cr_uid == (q)->p_ucred->cr_ruid || \
77 (cr)->cr_ruid == (q)->p_ucred->cr_uid || \
78 (cr)->cr_uid == (q)->p_ucred->cr_uid)
154 if (CAN_AFFECT(p, p->p_ucred, other_proc)) { in SYSCALL_NOT_PRESENT_GEN()
H A Dkern_prot.c441 cr = p->p_ucred; in sys_setuid()
527 cr = p->p_ucred; in sys_seteuid()
558 cr = p->p_ucred; in sys_setgid()
641 cr = p->p_ucred; in sys_setegid()
669 cr = p->p_ucred; in sys_setgroups()
714 cr = p->p_ucred; in sys_setreuid()
756 cr = p->p_ucred; in sys_setregid()
804 cr = p->p_ucred; in sys_setresuid()
851 cr = p->p_ucred; in sys_setresgid()
1171 oldcr = p->p_ucred; in cratom_proc()
[all …]
H A Dinit_main.c435 p->p_ucred = crget(); in proc0_init()
436 p->p_ucred->cr_ruidinfo = uip; in proc0_init()
437 p->p_ucred->cr_uidinfo = uip; in proc0_init()
438 p->p_ucred->cr_ngroups = 1; /* group 0 */ in proc0_init()
439 thread0.td_ucred = crhold(p->p_ucred); /* bootstrap fork1() */ in proc0_init()
442 p->p_ucred->cr_prison = NULL; in proc0_init()
473 (void)chgproccnt(p->p_ucred->cr_uidinfo, 1, 0); in proc0_init()
H A Dvfs_synth.c58 struct ucred *cred = proc0.p_ucred; in getsynthvnode()
121 if ((error = VFS_MOUNT(synth_mp, NULL, NULL, proc0.p_ucred))) { in synthinit()
H A Dkern_fp.c105 fsetcred(*fpp, td->td_proc->p_ucred); in fp_open()
165 error = VOP_ACCESS(vp, vmode, td->td_proc->p_ucred); in fp_vpopen()
176 fsetcred(*fpp, td->td_proc->p_ucred); in fp_vpopen()
178 error = VOP_OPEN(vp, flags, td->td_proc->p_ucred, fpp); in fp_vpopen()
H A Dkern_mib.c178 pr = p->p_ucred->cr_prison; in sysctl_hostname()
184 p->p_ucred->cr_prison->pr_host, in sysctl_hostname()
185 sizeof p->p_ucred->cr_prison->pr_host, req); in sysctl_hostname()
H A Dkern_exit.c1096 if (p->p_ucred->cr_uid != (uid_t)id) { in kern_wait()
1103 if (p->p_ucred->cr_gid != (gid_t)id) { in kern_wait()
1110 if (p->p_ucred->cr_prison && in kern_wait()
1111 p->p_ucred->cr_prison->pr_id != (int)id) { in kern_wait()
1231 info->si_uid = p->p_ucred->cr_uid; in kern_wait()
1279 chgproccnt(p->p_ucred->cr_ruidinfo, -1, 0); in kern_wait()
1286 cr = p->p_ucred; in kern_wait()
1287 p->p_ucred = NULL; in kern_wait()
H A Dsys_process.c310 if (!PRISON_CHECK(curp->p_ucred, p->p_ucred)) { in kern_ptrace()
359 if ((p->p_ucred->cr_ruid != curp->p_ucred->cr_ruid) || in kern_ptrace()
361 error = caps_priv_check(curp->p_ucred, in kern_ptrace()
H A Dkern_sig.c102 ((!p_trespass(curproc->p_ucred, (q)->p_ucred) && \
111 (ruid) == (q)->p_ucred->cr_ruid || \
112 (uc)->cr_uid == (q)->p_ucred->cr_ruid || \
113 (ruid) == (q)->p_ucred->cr_uid || \
114 (uc)->cr_uid == (q)->p_ucred->cr_uid)
2358 p->p_ucred ? p->p_ucred->cr_uid : -1, why); in killproc()
2405 p->p_ucred ? p->p_ucred->cr_uid : -1, in sigexit()
2517 struct ucred *cred = p->p_ucred; in coredump()
2542 name = expand_name(p->p_comm, p->p_ucred->cr_uid, p->p_pid); in coredump()
2576 if (vattr.va_uid != p->p_ucred->cr_uid) { in coredump()
H A Dlink_elf_obj.c420 if (p->p_ucred == NULL) { in link_elf_obj_load_file()
450 UIO_SYSSPACE, IO_NODELOCKED, p->p_ucred, &resid); in link_elf_obj_load_file()
506 UIO_SYSSPACE, IO_NODELOCKED, p->p_ucred, &resid); in link_elf_obj_load_file()
580 UIO_SYSSPACE, IO_NODELOCKED, p->p_ucred, &resid); in link_elf_obj_load_file()
594 UIO_SYSSPACE, IO_NODELOCKED, p->p_ucred, &resid); in link_elf_obj_load_file()
611 UIO_SYSSPACE, IO_NODELOCKED, p->p_ucred, &resid); in link_elf_obj_load_file()
737 UIO_SYSSPACE, IO_NODELOCKED, p->p_ucred, in link_elf_obj_load_file()
779 UIO_SYSSPACE, IO_NODELOCKED, p->p_ucred, &resid); in link_elf_obj_load_file()
795 UIO_SYSSPACE, IO_NODELOCKED, p->p_ucred, &resid); in link_elf_obj_load_file()
H A Dsysv_shm.c228 struct prison *pr = p->p_ucred->cr_prison; in sys_shmdt()
265 struct prison *pr = p->p_ucred->cr_prison; in sys_shmat()
405 struct prison *pr = p->p_ucred->cr_prison; in sys_shmctl()
501 struct ucred *cred = p->p_ucred; in shmget_allocate_segment()
615 struct prison *pr = p->p_ucred->cr_prison; in sys_shmget()
/dragonfly/sys/vfs/nfs/
H A Dbootp_subr.c744 (caddr_t) &ifctx->ireq, proc0.p_ucred); in bootpc_call()
766 (caddr_t) &ifctx->ireq, proc0.p_ucred); in bootpc_call()
996 error = ifioctl(so, SIOCGIFFLAGS, (caddr_t)ireq, proc0.p_ucred); in bootpc_fakeup_interface()
1000 error = ifioctl(so, SIOCSIFFLAGS, (caddr_t)ireq, proc0.p_ucred); in bootpc_fakeup_interface()
1013 error = ifioctl(so, SIOCSIFADDR, (caddr_t) ireq, proc0.p_ucred); in bootpc_fakeup_interface()
1023 error = ifioctl(so, SIOCSIFNETMASK, (caddr_t)ireq, proc0.p_ucred); in bootpc_fakeup_interface()
1036 error = ifioctl(so, SIOCSIFBRDADDR, (caddr_t)ireq, proc0.p_ucred); in bootpc_fakeup_interface()
1091 error = ifioctl(so, SIOCGIFFLAGS, (caddr_t)ireq, proc0.p_ucred); in bootpc_adjust_interface()
1096 error = ifioctl(so, SIOCSIFFLAGS, (caddr_t)ireq, proc0.p_ucred); in bootpc_adjust_interface()
1103 error = ifioctl(so, SIOCDIFADDR, (caddr_t) ireq, proc0.p_ucred); in bootpc_adjust_interface()
[all …]
/dragonfly/sys/ddb/
H A Ddb_ps.c84 p->p_ucred ? p->p_ucred->cr_ruid : 0, pp->p_pid, in db_ps()

1234