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/init_main.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/init_main.c')
-rw-r--r-- | sys/kern/init_main.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c index a80576c7459..aef28cb4634 100644 --- a/sys/kern/init_main.c +++ b/sys/kern/init_main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: init_main.c,v 1.208 2014/03/29 18:09:31 guenther Exp $ */ +/* $OpenBSD: init_main.c,v 1.209 2014/03/30 21:54:48 guenther Exp $ */ /* $NetBSD: init_main.c,v 1.84.4.1 1996/06/02 09:08:06 mrg Exp $ */ /* @@ -114,7 +114,6 @@ struct session session0; struct pgrp pgrp0; struct proc proc0; struct process process0; -struct pcred cred0; struct plimit limit0; struct vmspace vmspace0; struct sigacts sigacts0; @@ -293,9 +292,8 @@ main(void *framep) timeout_set(&pr->ps_realit_to, realitexpire, pr); /* Create credentials. */ - p->p_cred = &cred0; - p->p_ucred = crget(); - p->p_ucred->cr_ngroups = 1; /* group 0 */ + pr->ps_ucred = crget(); + pr->ps_ucred->cr_ngroups = 1; /* group 0 */ /* Initialize signal state for process 0. */ signal_init(); |