summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_prot.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/kern_prot.c')
-rw-r--r--sys/kern/kern_prot.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c
index 95a7c0a2401..c4a833de12e 100644
--- a/sys/kern/kern_prot.c
+++ b/sys/kern/kern_prot.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_prot.c,v 1.52 2012/02/20 22:23:39 guenther Exp $ */
+/* $OpenBSD: kern_prot.c,v 1.53 2012/04/10 15:50:52 guenther Exp $ */
/* $NetBSD: kern_prot.c,v 1.33 1996/02/09 18:59:42 christos Exp $ */
/*
@@ -391,8 +391,8 @@ sys_setresuid(struct proc *p, void *v, register_t *retval)
/*
* Transfer proc count to new user.
*/
- (void)chgproccnt(pc->p_ruid, -p->p_p->ps_refcnt);
- (void)chgproccnt(ruid, p->p_p->ps_refcnt);
+ (void)chgproccnt(pc->p_ruid, -1);
+ (void)chgproccnt(ruid, 1);
pc->p_ruid = ruid;
}
if (euid != (uid_t)-1 && euid != pc->pc_ucred->cr_uid) {
@@ -596,8 +596,8 @@ sys_setuid(struct proc *p, void *v, register_t *retval)
* Transfer proc count to new user.
*/
if (uid != pc->p_ruid) {
- (void)chgproccnt(pc->p_ruid, -p->p_p->ps_refcnt);
- (void)chgproccnt(uid, p->p_p->ps_refcnt);
+ (void)chgproccnt(pc->p_ruid, -1);
+ (void)chgproccnt(uid, 1);
}
pc->p_ruid = uid;
pc->p_svuid = uid;