summaryrefslogtreecommitdiffstats
path: root/sys/kern/exec_script.c
diff options
context:
space:
mode:
authorart <art@openbsd.org>2001-10-26 12:03:27 +0000
committerart <art@openbsd.org>2001-10-26 12:03:27 +0000
commitaf97e5cfdd9f3b11ddf6b53127c6fa8808c13864 (patch)
tree196c0184f49baa99376ee4bc29405db139ede540 /sys/kern/exec_script.c
parentWell, "zap kernfs" and MISS! (diff)
downloadwireguard-openbsd-af97e5cfdd9f3b11ddf6b53127c6fa8808c13864.tar.xz
wireguard-openbsd-af97e5cfdd9f3b11ddf6b53127c6fa8808c13864.zip
- every new fd created by falloc() is marked as larval and should not be used
any anyone. Every caller of falloc matures the fd when it's usable. - Since every lookup in the fd table must now check this flag and all of them do the same thing, move all the necessary checks into a function - fd_getfile.
Diffstat (limited to 'sys/kern/exec_script.c')
-rw-r--r--sys/kern/exec_script.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/kern/exec_script.c b/sys/kern/exec_script.c
index 1ac12a36ef6..ee852e32222 100644
--- a/sys/kern/exec_script.c
+++ b/sys/kern/exec_script.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: exec_script.c,v 1.13 2001/06/22 14:14:08 deraadt Exp $ */
+/* $OpenBSD: exec_script.c,v 1.14 2001/10/26 12:03:27 art Exp $ */
/* $NetBSD: exec_script.c,v 1.13 1996/02/04 02:15:06 christos Exp $ */
/*
@@ -180,6 +180,7 @@ check_shell:
fp->f_ops = &vnops;
fp->f_data = (caddr_t) epp->ep_vp;
fp->f_flag = FREAD;
+ FILE_SET_MATURE(fp);
}
#endif