summaryrefslogtreecommitdiff
path: root/sys/kern/init_main.c
diff options
context:
space:
mode:
authorDon Lewis <truckman@FreeBSD.org>2000-09-05 22:11:13 +0000
committerDon Lewis <truckman@FreeBSD.org>2000-09-05 22:11:13 +0000
commitf535380cb6129e205bfa36db821a10ef3c1ac7e2 (patch)
tree668aab377679172594317be90e74de8e35657fc9 /sys/kern/init_main.c
parent68c9803b7f9d3318deff66f5e436c30052201710 (diff)
Notes
Diffstat (limited to 'sys/kern/init_main.c')
-rw-r--r--sys/kern/init_main.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c
index 1a2644b44e6a..6d0d915ae54e 100644
--- a/sys/kern/init_main.c
+++ b/sys/kern/init_main.c
@@ -302,9 +302,11 @@ proc0_init(void *dummy __unused)
/* Create credentials. */
cred0.p_refcnt = 1;
+ cred0.p_uidinfo = uifind(0);
p->p_cred = &cred0;
p->p_ucred = crget();
p->p_ucred->cr_ngroups = 1; /* group 0 */
+ p->p_ucred->cr_uidinfo = uifind(0);
/* Don't jail it */
p->p_prison = 0;
@@ -360,7 +362,7 @@ proc0_init(void *dummy __unused)
/*
* Charge root for one process.
*/
- (void)chgproccnt(0, 1, 0);
+ (void)chgproccnt(cred0.p_uidinfo, 1, 0);
/*
* Initialize the current process pointer (curproc) before