summaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2000-04-29 17:46:29 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2000-04-29 17:46:29 +0000
commitc032b17fb6c38cec93259d45dab8fcb5c5c66a7b (patch)
tree8f9276c1f1de1c5a8a77c9b12d5b2801f1bbd980 /sys/kern
parent6a79409061ad5907b31cd57188096291299bdd7d (diff)
ktrace(2) should not follow symbolic links; from FreeBSD
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/kern_ktrace.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_ktrace.c b/sys/kern/kern_ktrace.c
index 62bd73a871f..699fe89a58a 100644
--- a/sys/kern/kern_ktrace.c
+++ b/sys/kern/kern_ktrace.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_ktrace.c,v 1.19 2000/04/21 07:39:15 deraadt Exp $ */
+/* $OpenBSD: kern_ktrace.c,v 1.20 2000/04/29 17:46:28 millert Exp $ */
/* $NetBSD: kern_ktrace.c,v 1.23 1996/02/09 18:59:36 christos Exp $ */
/*
@@ -327,7 +327,7 @@ sys_ktrace(curp, v, retval)
*/
NDINIT(&nd, LOOKUP, FOLLOW, UIO_USERSPACE, SCARG(uap, fname),
curp);
- if ((error = vn_open(&nd, FREAD|FWRITE, 0)) != 0) {
+ if ((error = vn_open(&nd, FREAD|FWRITE|O_NOFOLLOW, 0)) != 0) {
curp->p_traceflag &= ~KTRFAC_ACTIVE;
return (error);
}