summaryrefslogtreecommitdiff
path: root/sys/kern/init_main.c
diff options
context:
space:
mode:
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