| #
308399a1
|
| 19-Aug-2024 |
Andre Albsmeier <mail@fbsd2.e4m.org> |
tail -F: fix crash
When show() detects an error and closes the file and follow() wants to close it again, a NULL dereference occurs.
PR: 280910 MFC after: 1 week
|
| #
1fb3caee
|
| 03-Jan-2024 |
Ricardo Branco <rbranco@suse.de> |
tail: Do not trust st_size if it equals zero.
PR: bin/276107 MFC after: 1 week
|
| #
c58205be
|
| 27-Dec-2023 |
Gordon Bergling <gbe@FreeBSD.org> |
tail(1): Fix a typo in a source code comment
- s/recieved/received/
MFC after: 3 days
|
| #
b70e57be
|
| 29-Nov-2023 |
Dag-Erling Smørgrav <des@FreeBSD.org> |
tail: Clean up error messages.
MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D42842
|
| #
621f4553
|
| 29-Nov-2023 |
Dag-Erling Smørgrav <des@FreeBSD.org> |
tail: Fix heap overflow in -F case.
The number of events we track can vary over time, but we only allocate enough space for the exact number of events we are tracking when we first begin, resulting
tail: Fix heap overflow in -F case.
The number of events we track can vary over time, but we only allocate enough space for the exact number of events we are tracking when we first begin, resulting in a trivially reproducable heap overflow. Fix this by allocating enough space for the greatest possible number of events (two per file) and clean up the code a bit.
Also add a test case which triggers the aforementioned heap overflow, although we don't currently have a way to detect it.
MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: allanjude, markj Differential Revision: https://reviews.freebsd.org/D42839
show more ...
|
| #
bdcbfde3
|
| 23-Nov-2023 |
Warner Losh <imp@FreeBSD.org> |
usr.bin: Remove ancient SCCS tags.
Remove ancient SCCS tags from the tree, automated scripting, with two minor fixup to keep things compiling. All the common forms in the tree were removed with a pe
usr.bin: Remove ancient SCCS tags.
Remove ancient SCCS tags from the tree, automated scripting, with two minor fixup to keep things compiling. All the common forms in the tree were removed with a perl script.
Sponsored by: Netflix
show more ...
|
| #
e5d258c9
|
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
Remove $FreeBSD$: two-line .c pattern
Remove /^#include\s+<sys/cdefs.h>.*$\n\s+__FBSDID\("\$FreeBSD\$"\);\n/
|
| #
ef6f20ce
|
| 19-Feb-2023 |
Warner Losh <imp@FreeBSD.org> |
tail: Retry kevent if the system call was interrupted
kevent returns EINTR when I suspend / resume. This causes tail -f and tail -F to exit with interrupt system call. Ignore this error and try keve
tail: Retry kevent if the system call was interrupted
kevent returns EINTR when I suspend / resume. This causes tail -f and tail -F to exit with interrupt system call. Ignore this error and try kevent again.
Sponsored by: Netflix
show more ...
|
| #
643ac419
|
| 13-Jul-2022 |
Xin LI <delphij@FreeBSD.org> |
Improve usability of head(1) and tail(1):
- Consistently support -q (quiet) and -v (verbose) - Allow specifying numbers with SI prefixes supported by expand_number(3) - Remove 2^31 limit on lines
Improve usability of head(1) and tail(1):
- Consistently support -q (quiet) and -v (verbose) - Allow specifying numbers with SI prefixes supported by expand_number(3) - Remove 2^31 limit on lines for head(1)
MFC after: 2 weeks Reviewed by: lwhsu, pauamma, gbe Relnotes: yes Differential Revision: https://reviews.freebsd.org/D35720
show more ...
|
| #
7787e7ee
|
| 02-Feb-2021 |
Chuck Silvers <chs@FreeBSD.org> |
tail: fix "tail -F" file rotation detection
When checking if the newly opened file is the same as the old one, we need to fstat() the new file descriptor, not the old one again.
Reviewed by: glebiu
tail: fix "tail -F" file rotation detection
When checking if the newly opened file is the same as the old one, we need to fstat() the new file descriptor, not the old one again.
Reviewed by: glebius Sponsored by: Netflix
show more ...
|
| #
e532a999
|
| 20-Jun-2019 |
Alan Somers <asomers@FreeBSD.org> |
MFHead @349234
Sponsored by: The FreeBSD Foundation
|
| #
c851fce6
|
| 09-Jun-2019 |
Mariusz Zaborski <oshogbo@FreeBSD.org> |
tail: fix the checks if the file was rotated
The freopen(3) was replaced with fileargs_open(3) and fclose(3). In the following function, we skip if the stream is standard in, so it is safe to do so.
tail: fix the checks if the file was rotated
The freopen(3) was replaced with fileargs_open(3) and fclose(3). In the following function, we skip if the stream is standard in, so it is safe to do so. This also requires us to change the logic first to open the file and then check its status. The stat(2) is disallowed in capability mode.
This commit unbrakes the -F option. The bug was introduced in the r348708.
Reported by: pho Tested by: pho
show more ...
|
| #
308399a1
|
| 19-Aug-2024 |
Andre Albsmeier <mail@fbsd2.e4m.org> |
tail -F: fix crash
When show() detects an error and closes the file and follow() wants to close it again, a NULL dereference occurs.
PR: 280910 MFC after: 1 week
|
| #
1fb3caee
|
| 03-Jan-2024 |
Ricardo Branco <rbranco@suse.de> |
tail: Do not trust st_size if it equals zero.
PR: bin/276107 MFC after: 1 week
|
| #
c58205be
|
| 27-Dec-2023 |
Gordon Bergling <gbe@FreeBSD.org> |
tail(1): Fix a typo in a source code comment
- s/recieved/received/
MFC after: 3 days
|
| #
b70e57be
|
| 29-Nov-2023 |
Dag-Erling Smørgrav <des@FreeBSD.org> |
tail: Clean up error messages.
MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D42842
|
| #
621f4553
|
| 29-Nov-2023 |
Dag-Erling Smørgrav <des@FreeBSD.org> |
tail: Fix heap overflow in -F case.
The number of events we track can vary over time, but we only allocate enough space for the exact number of events we are tracking when we first begin, resulting
tail: Fix heap overflow in -F case.
The number of events we track can vary over time, but we only allocate enough space for the exact number of events we are tracking when we first begin, resulting in a trivially reproducable heap overflow. Fix this by allocating enough space for the greatest possible number of events (two per file) and clean up the code a bit.
Also add a test case which triggers the aforementioned heap overflow, although we don't currently have a way to detect it.
MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: allanjude, markj Differential Revision: https://reviews.freebsd.org/D42839
show more ...
|
| #
bdcbfde3
|
| 23-Nov-2023 |
Warner Losh <imp@FreeBSD.org> |
usr.bin: Remove ancient SCCS tags.
Remove ancient SCCS tags from the tree, automated scripting, with two minor fixup to keep things compiling. All the common forms in the tree were removed with a pe
usr.bin: Remove ancient SCCS tags.
Remove ancient SCCS tags from the tree, automated scripting, with two minor fixup to keep things compiling. All the common forms in the tree were removed with a perl script.
Sponsored by: Netflix
show more ...
|
| #
e5d258c9
|
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
Remove $FreeBSD$: two-line .c pattern
Remove /^#include\s+<sys/cdefs.h>.*$\n\s+__FBSDID\("\$FreeBSD\$"\);\n/
|
| #
ef6f20ce
|
| 19-Feb-2023 |
Warner Losh <imp@FreeBSD.org> |
tail: Retry kevent if the system call was interrupted
kevent returns EINTR when I suspend / resume. This causes tail -f and tail -F to exit with interrupt system call. Ignore this error and try keve
tail: Retry kevent if the system call was interrupted
kevent returns EINTR when I suspend / resume. This causes tail -f and tail -F to exit with interrupt system call. Ignore this error and try kevent again.
Sponsored by: Netflix
show more ...
|
| #
643ac419
|
| 13-Jul-2022 |
Xin LI <delphij@FreeBSD.org> |
Improve usability of head(1) and tail(1):
- Consistently support -q (quiet) and -v (verbose) - Allow specifying numbers with SI prefixes supported by expand_number(3) - Remove 2^31 limit on lines
Improve usability of head(1) and tail(1):
- Consistently support -q (quiet) and -v (verbose) - Allow specifying numbers with SI prefixes supported by expand_number(3) - Remove 2^31 limit on lines for head(1)
MFC after: 2 weeks Reviewed by: lwhsu, pauamma, gbe Relnotes: yes Differential Revision: https://reviews.freebsd.org/D35720
show more ...
|
| #
7787e7ee
|
| 02-Feb-2021 |
Chuck Silvers <chs@FreeBSD.org> |
tail: fix "tail -F" file rotation detection
When checking if the newly opened file is the same as the old one, we need to fstat() the new file descriptor, not the old one again.
Reviewed by: glebiu
tail: fix "tail -F" file rotation detection
When checking if the newly opened file is the same as the old one, we need to fstat() the new file descriptor, not the old one again.
Reviewed by: glebius Sponsored by: Netflix
show more ...
|
| #
e532a999
|
| 20-Jun-2019 |
Alan Somers <asomers@FreeBSD.org> |
MFHead @349234
Sponsored by: The FreeBSD Foundation
|
| #
c851fce6
|
| 09-Jun-2019 |
Mariusz Zaborski <oshogbo@FreeBSD.org> |
tail: fix the checks if the file was rotated
The freopen(3) was replaced with fileargs_open(3) and fclose(3). In the following function, we skip if the stream is standard in, so it is safe to do so.
tail: fix the checks if the file was rotated
The freopen(3) was replaced with fileargs_open(3) and fclose(3). In the following function, we skip if the stream is standard in, so it is safe to do so. This also requires us to change the logic first to open the file and then check its status. The stat(2) is disallowed in capability mode.
This commit unbrakes the -F option. The bug was introduced in the r348708.
Reported by: pho Tested by: pho
show more ...
|
| #
82725ba9
|
| 23-Nov-2017 |
Hans Petter Selasky <hselasky@FreeBSD.org> |
Merge ^/head r325999 through r326131.
|