summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1997-06-04 14:34:18 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1997-06-04 14:34:18 +0000
commit92139d641a6d74817abb11110b82a46184d10ad5 (patch)
treef74f9347ba6aa438e7bdb079f794e25f998c161f
parentbb97a944b0c0ae7f047952e0bd8f8f7a3da544a0 (diff)
clear timer for setuid; kloo
-rw-r--r--sys/kern/kern_exec.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c
index ee48242bb31..6de528c9d24 100644
--- a/sys/kern/kern_exec.c
+++ b/sys/kern/kern_exec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_exec.c,v 1.9 1997/03/29 20:10:01 tholo Exp $ */
+/* $OpenBSD: kern_exec.c,v 1.10 1997/06/04 14:34:17 deraadt Exp $ */
/* $NetBSD: kern_exec.c,v 1.75 1996/02/09 18:59:28 christos Exp $ */
/*-
@@ -479,6 +479,14 @@ sys_execve(p, v, retval)
p->p_cred->p_svuid = p->p_ucred->cr_uid;
p->p_cred->p_svgid = p->p_ucred->cr_gid;
+ if (p->p_flag & P_SUGIDEXEC) {
+ int s = splclock();
+ untimeout(realitexpire, (void *)p);
+ timerclear(&p->p_realtimer.it_interval);
+ timerclear(&p->p_realtimer.it_value);
+ splx(s);
+ }
+
kmem_free_wakeup(exec_map, (vm_offset_t) argp, NCARGS);
FREE(nid.ni_cnd.cn_pnbuf, M_NAMEI);