Module Name:    src
Committed By:   pgoyette
Date:           Fri Nov 20 01:21:05 UTC 2015

Modified Files:
        src/sys/dev/filemon: filemon.c

Log Message:
Don't allow setting the PID-to-trace if the target has a non-native
emulation.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/dev/filemon/filemon.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/filemon/filemon.c
diff -u src/sys/dev/filemon/filemon.c:1.12 src/sys/dev/filemon/filemon.c:1.13
--- src/sys/dev/filemon/filemon.c:1.12	Fri Nov 20 01:12:38 2015
+++ src/sys/dev/filemon/filemon.c	Fri Nov 20 01:21:05 2015
@@ -24,7 +24,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: filemon.c,v 1.12 2015/11/20 01:12:38 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: filemon.c,v 1.13 2015/11/20 01:21:05 pgoyette Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -308,7 +308,8 @@ filemon_ioctl(struct file * fp, u_long c
 		mutex_enter(proc_lock);
 		tp = proc_find(*((pid_t *) data));
 		mutex_exit(proc_lock);
-		if (tp == NULL) {
+		if (tp == NULL ||
+		    tp->p_emul != &emul_netbsd)) {
 			error = ESRCH;
 			break;
 		}

Reply via email to