diff options
author | 2017-11-28 06:03:41 +0000 | |
---|---|---|
committer | 2017-11-28 06:03:41 +0000 | |
commit | 9a47e8df98441e0ac9fae9c35797333c733063e9 (patch) | |
tree | a8aa699c6d95be46abf57a7c4f7ebeac66d823fc /lib/libc | |
parent | The athn(4) PCI driver forgot about adding the default noisefloor to (diff) | |
download | wireguard-openbsd-9a47e8df98441e0ac9fae9c35797333c733063e9.tar.xz wireguard-openbsd-9a47e8df98441e0ac9fae9c35797333c733063e9.zip |
Delete fktrace(2). The consequences of it were not thought through
sufficiently and at least one horrific security hole was the result.
ok deraadt@ beck@
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/sys/Makefile.inc | 4 | ||||
-rw-r--r-- | lib/libc/sys/ktrace.2 | 43 |
2 files changed, 7 insertions, 40 deletions
diff --git a/lib/libc/sys/Makefile.inc b/lib/libc/sys/Makefile.inc index 3942aaaae41..40cbd9640fc 100644 --- a/lib/libc/sys/Makefile.inc +++ b/lib/libc/sys/Makefile.inc @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.inc,v 1.152 2017/08/13 19:34:12 tedu Exp $ +# $OpenBSD: Makefile.inc,v 1.153 2017/11/28 06:03:41 guenther Exp $ # $NetBSD: Makefile.inc,v 1.35 1995/10/16 23:49:07 jtc Exp $ # @(#)Makefile.inc 8.1 (Berkeley) 6/17/93 @@ -47,7 +47,7 @@ ASM= __semctl.o __syscall.o __thrsigdivert.o \ dup.o dup2.o dup3.o \ execve.o \ faccessat.o fchdir.o fchflags.o fchmod.o fchmodat.o fchown.o \ - fchownat.o fhopen.o fhstat.o fhstatfs.o fktrace.o \ + fchownat.o fhopen.o fhstat.o fhstatfs.o \ flock.o fpathconf.o fstat.o fstatat.o fstatfs.o \ futimens.o futimes.o \ getentropy.o getdents.o getfh.o getfsstat.o \ diff --git a/lib/libc/sys/ktrace.2 b/lib/libc/sys/ktrace.2 index da5d5fd090a..400c38fe30b 100644 --- a/lib/libc/sys/ktrace.2 +++ b/lib/libc/sys/ktrace.2 @@ -1,4 +1,4 @@ -.\" $OpenBSD: ktrace.2,v 1.34 2017/10/08 19:21:10 guenther Exp $ +.\" $OpenBSD: ktrace.2,v 1.35 2017/11/28 06:03:41 guenther Exp $ .\" $NetBSD: ktrace.2,v 1.2 1995/02/27 12:33:58 cgd Exp $ .\" .\" Copyright (c) 1993 @@ -30,12 +30,11 @@ .\" .\" @(#)ktrace.2 8.1 (Berkeley) 6/4/93 .\" -.Dd $Mdocdate: October 8 2017 $ +.Dd $Mdocdate: November 28 2017 $ .Dt KTRACE 2 .Os .Sh NAME -.Nm ktrace , -.Nm fktrace +.Nm ktrace .Nd process tracing .Sh SYNOPSIS .In sys/types.h @@ -44,31 +43,20 @@ .In sys/ktrace.h .Ft int .Fn ktrace "const char *tracefile" "int ops" "int trpoints" "pid_t pid" -.Ft int -.Fn fktrace "int tracefd" "int ops" "int trpoints" "pid_t pid" .Sh DESCRIPTION The .Fn ktrace -and -.Fn fktrace -functions enable or disable tracing of one or more processes. +function enables or disables tracing of one or more processes. Users may only trace their own processes. Only the superuser can trace setuid or setgid programs. -These functions are only available on kernels compiled with the +This function is only available on kernels compiled with the .Cm KTRACE option. .Pp -For -.Fn ktrace , .Fa tracefile gives the pathname of the file to be used for tracing. The file must exist, be writable by the calling process, and not be a symbolic link. -For -.Fn fktrace , -an existing file descriptor -.Fa tracefd -gives the open file descriptor to which the trace records are written. If tracing points are being disabled (see .Dv KTROP_CLEAR below), @@ -188,8 +176,6 @@ include file. .Rv -std .Sh ERRORS .Fn ktrace -and -.Fn fktrace will fail if: .Bl -tag -width EINVALAA .It Bq Er EINVAL @@ -240,17 +226,6 @@ Too many symbolic links were encountered in translating the pathname. .Fa tracefile points outside the process's allocated address space. .El -.Pp -.Fn fktrace -will fail if: -.Bl -tag -width EINVALAA -.It Bq Er EBADF -.Fa tracefd -does not refer to a valid descriptor open for writing. -.It Bq Er EINVAL -.Fa tracefd -refers to a socket, pipe, or kqueue, not a file. -.El .Sh SEE ALSO .Xr kdump 1 , .Xr ktrace 1 , @@ -260,11 +235,3 @@ A .Fn ktrace function call first appeared in .Bx 4.4 . -The -.Fn fktrace -function first appeared in -.Nx 1.4 . -It was added to -.Ox -in -.Ox 6.2 . |