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 * record proc's cred in p_cred too
details: https://anonhg.NetBSD.org/src/rev/26412925482c
branches: trunk
changeset: 757456:26412925482c
user: pooka <pooka%NetBSD.org@localhost>
date: Mon Aug 30 10:49:40 2010 +0000
description:
* record proc's cred in p_cred too
* account procs for uids
diffstat:
sys/rump/librump/rumpkern/rump.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diffs (37 lines):
diff -r 35ecef184e82 -r 26412925482c sys/rump/librump/rumpkern/rump.c
--- a/sys/rump/librump/rumpkern/rump.c Mon Aug 30 10:41:54 2010 +0000
+++ b/sys/rump/librump/rumpkern/rump.c Mon Aug 30 10:49:40 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rump.c,v 1.182 2010/08/26 19:56:07 pooka Exp $ */
+/* $NetBSD: rump.c,v 1.183 2010/08/30 10:49:40 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.182 2010/08/26 19:56:07 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.183 2010/08/30 10:49:40 pooka Exp $");
#include <sys/systm.h>
#define ELFSIZE ARCH_ELFSIZE
@@ -530,8 +530,9 @@
p->p_fd = fd_init(NULL);
p->p_lock = mutex_obj_alloc(MUTEX_DEFAULT, IPL_NONE);
p->p_pgrp = &rump_pgrp;
- l->l_cred = rump_cred_suserget();
+ p->p_cred = l->l_cred = rump_cred_suserget();
+ chgproccnt(0, 1);
atomic_inc_uint(&nprocs);
} else {
p = &proc0;
@@ -576,6 +577,7 @@
if (p->p_pid != 0) {
mutex_obj_free(p->p_lock);
fd_free();
+ chgproccnt(kauth_cred_getuid(p->p_cred), -1);
if (rump_proc_vfs_release)
rump_proc_vfs_release(p);
rump_cred_put(l->l_cred);
Home |
Main Index |
Thread Index |
Old Index