Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/rump/librump/rumpkern Count proc0 as uid 0's process. B...



details:   https://anonhg.NetBSD.org/src/rev/d3fc6b659d68
branches:  trunk
changeset: 758243:d3fc6b659d68
user:      pooka <pooka%NetBSD.org@localhost>
date:      Thu Oct 28 11:30:07 2010 +0000

description:
Count proc0 as uid 0's process.  Besides being the right thing to
do, this effectively allows changing the uid of proc0 without
running into KASSERT problems in uidinfo code (although I'm not
quite so sure changing proc0's uid is the right thing to do ...).

problem reported by njoly

diffstat:

 sys/rump/librump/rumpkern/rump.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (35 lines):

diff -r ebf7773dddaf -r d3fc6b659d68 sys/rump/librump/rumpkern/rump.c
--- a/sys/rump/librump/rumpkern/rump.c  Thu Oct 28 09:49:01 2010 +0000
+++ b/sys/rump/librump/rumpkern/rump.c  Thu Oct 28 11:30:07 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rump.c,v 1.191 2010/10/27 20:44:49 pooka Exp $ */
+/*     $NetBSD: rump.c,v 1.192 2010/10/28 11:30:07 pooka Exp $ */
 
 /*
  * Copyright (c) 2007 Antti Kantee.  All Rights Reserved.
@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.191 2010/10/27 20:44:49 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.192 2010/10/28 11:30:07 pooka Exp $");
 
 #include <sys/systm.h>
 #define ELFSIZE ARCH_ELFSIZE
@@ -312,6 +312,8 @@
 
        procinit();
        proc0_init();
+       uid_init();
+       chgproccnt(0, 1);
 
        l->l_proc = &proc0;
        lwp_update_creds(l);
@@ -358,7 +360,6 @@
        mksysctls();
        kqueue_init();
        iostat_init();
-       uid_init();
        fd_sys_init();
        module_init();
        devsw_init();



Home | Main Index | Thread Index | Old Index