diff options
author | Philip Guenther <guenther@cvs.openbsd.org> | 2014-03-30 21:54:50 +0000 |
---|---|---|
committer | Philip Guenther <guenther@cvs.openbsd.org> | 2014-03-30 21:54:50 +0000 |
commit | 7462bb1b86b895dab1b1b555c941578365367199 (patch) | |
tree | 2be23589f75ab6cd1bd1180a4f063217d94820de /sys/kern/kern_proc.c | |
parent | 4eb2d12b27096ee78c5daf9473a287c1b1ea15f7 (diff) |
Eliminates struct pcred by moving the real and saved ugids into
struct ucred; struct process then directly links to the ucred
Based on a discussion at c2k10 or so before noting that FreeBSD and
NetBSD did this too.
ok matthew@
Diffstat (limited to 'sys/kern/kern_proc.c')
-rw-r--r-- | sys/kern/kern_proc.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c index 9512e05f925..c749d5352ae 100644 --- a/sys/kern/kern_proc.c +++ b/sys/kern/kern_proc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_proc.c,v 1.56 2014/03/26 05:23:42 guenther Exp $ */ +/* $OpenBSD: kern_proc.c,v 1.57 2014/03/30 21:54:48 guenther Exp $ */ /* $NetBSD: kern_proc.c,v 1.14 1996/02/09 18:59:41 christos Exp $ */ /* @@ -70,7 +70,6 @@ struct pool rusage_pool; struct pool ucred_pool; struct pool pgrp_pool; struct pool session_pool; -struct pool pcred_pool; static void orphanpg(struct pgrp *); #ifdef DEBUG @@ -106,8 +105,6 @@ procinit(void) &pool_allocator_nointr); pool_init(&session_pool, sizeof(struct session), 0, 0, 0, "sessionpl", &pool_allocator_nointr); - pool_init(&pcred_pool, sizeof(struct pcred), 0, 0, 0, "pcredpl", - &pool_allocator_nointr); } struct uidinfo * @@ -477,7 +474,7 @@ db_show_all_procs(db_expr_t addr, int haddr, db_expr_t count, char *modif) "%-12.12s %-16s\n", ppr ? ppr->ps_pid : -1, pr->ps_pgrp ? pr->ps_pgrp->pg_id : -1, - pr->ps_cred->p_ruid, p->p_stat, + pr->ps_ucred->cr_ruid, p->p_stat, p->p_flag | pr->ps_flags, (p->p_wchan && p->p_wmesg) ? p->p_wmesg : "", p->p_comm); |