Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/bin/systrace The SYSTR_CLONE ioctl is gone, so don't use it....
details: https://anonhg.NetBSD.org/src/rev/7e9f20b5033a
branches: trunk
changeset: 532925:7e9f20b5033a
user: thorpej <thorpej%NetBSD.org@localhost>
date: Tue Jun 18 01:25:04 2002 +0000
description:
The SYSTR_CLONE ioctl is gone, so don't use it. (The kernel clones
the systrace communication channel as needed.)
diffstat:
bin/systrace/netbsd-syscalls.c | 17 +++++------------
1 files changed, 5 insertions(+), 12 deletions(-)
diffs (47 lines):
diff -r b00300d57efd -r 7e9f20b5033a bin/systrace/netbsd-syscalls.c
--- a/bin/systrace/netbsd-syscalls.c Tue Jun 18 01:24:15 2002 +0000
+++ b/bin/systrace/netbsd-syscalls.c Tue Jun 18 01:25:04 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: netbsd-syscalls.c,v 1.1 2002/06/17 16:29:09 christos Exp $ */
+/* $NetBSD: netbsd-syscalls.c,v 1.2 2002/06/18 01:25:04 thorpej Exp $ */
/*
* Copyright 2002 Niels Provos <provos%citi.umich.edu@localhost>
@@ -30,7 +30,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: netbsd-syscalls.c,v 1.1 2002/06/17 16:29:09 christos Exp $");
+__RCSID("$NetBSD: netbsd-syscalls.c,v 1.2 2002/06/18 01:25:04 thorpej Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -198,7 +198,7 @@
nbsd_open(void)
{
char *path = "/dev/systrace";
- int fd, cfd = -1;
+ int fd;
fd = open(path, O_RDONLY, 0);
if (fd == -1) {
@@ -206,17 +206,10 @@
return (-1);
}
- if (ioctl(fd, SYSTR_CLONE, &cfd) == -1) {
- warn("ioctl(SYSTR_CLONE)");
- goto out;
- }
-
- if (fcntl(cfd, F_SETFD, 1) == -1)
+ if (fcntl(fd, F_SETFD, 1) == -1)
warn("fcntl(F_SETFD)");
- out:
- close (fd);
- return (cfd);
+ return (fd);
}
static struct intercept_pid *
Home |
Main Index |
Thread Index |
Old Index