aboutsummaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/conf/newvers.sh2
-rw-r--r--sys/kern/kern_exec.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh
index 03d0dc107019..c0ee546323a5 100644
--- a/sys/conf/newvers.sh
+++ b/sys/conf/newvers.sh
@@ -36,7 +36,7 @@
TYPE="FreeBSD"
REVISION="4.4"
-BRANCH="RELEASE-p16"
+BRANCH="RELEASE-p17"
RELEASE="${REVISION}-${BRANCH}"
VERSION="${TYPE} ${RELEASE}"
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c
index 0e546f71f9fe..e84027eaae7d 100644
--- a/sys/kern/kern_exec.c
+++ b/sys/kern/kern_exec.c
@@ -323,6 +323,8 @@ interpret:
vrele(p->p_tracep);
p->p_tracep = NULL;
}
+ /* Close any file descriptors 0..2 that reference procfs */
+ setugidsafety(p);
/* Make sure file descriptors 0..2 are in use. */
error = fdcheckstd(p);
if (error != 0)
@@ -335,7 +337,6 @@ interpret:
change_euid(p, attr.va_uid);
if (attr.va_mode & VSGID)
p->p_ucred->cr_gid = attr.va_gid;
- setugidsafety(p);
} else {
if (p->p_ucred->cr_uid == p->p_cred->p_ruid &&
p->p_ucred->cr_gid == p->p_cred->p_rgid)