History log of /freebsd/usr.bin/tail/forward.c (Results 1 – 25 of 115)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 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


Revision tags: release/14.1.0, release/13.3.0
# 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 ...


Revision tags: release/14.0.0
# 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/


Revision tags: release/13.2.0
# 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 ...


Revision tags: release/12.4.0
# 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 ...


Revision tags: release/13.1.0, release/12.3.0, release/13.0.0
# 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 ...


Revision tags: release/12.2.0, release/11.4.0, release/12.1.0, release/11.3.0
# e532a999 20-Jun-2019 Alan Somers <asomers@FreeBSD.org>

MFHead @349234

Sponsored by: The FreeBSD Foundation


# c851fce6 10-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 ...


Revision tags: release/12.0.0, release/11.2.0
# 82725ba9 23-Nov-2017 Hans Petter Selasky <hselasky@FreeBSD.org>

Merge ^/head r325999 through r326131.


# 8a16b7a1 20-Nov-2017 Pedro F. Giffuni <pfg@FreeBSD.org>

General further adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 3-Clause license.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier f

General further adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 3-Clause license.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.

show more ...


Revision tags: release/10.4.0, release/11.1.0
# 348238db 01-Mar-2017 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r314420 through r314481.


# fbbd9655 01-Mar-2017 Warner Losh <imp@FreeBSD.org>

Renumber copyright clause 4

Renumber cluase 4 to 3, per what everybody else did when BSD granted
them permission to remove clause 3. My insistance on keeping the same
numbering for legal reasons is

Renumber copyright clause 4

Renumber cluase 4 to 3, per what everybody else did when BSD granted
them permission to remove clause 3. My insistance on keeping the same
numbering for legal reasons is too pedantic, so give up on that point.

Submitted by: Jan Schaumann <jschauma@stevens.edu>
Pull Request: https://github.com/freebsd/freebsd/pull/96

show more ...


Revision tags: release/11.0.1, release/11.0.0, release/10.3.0, release/10.2.0, release/10.1.0, release/9.3.0, release/10.0.0, release/9.2.0
# d1d01586 05-Sep-2013 Simon J. Gerraty <sjg@FreeBSD.org>

Merge from head


# 40f65a4d 07-Aug-2013 Peter Grehan <grehan@FreeBSD.org>

IFC @ r254014


# 552311f4 17-Jul-2013 Xin LI <delphij@FreeBSD.org>

IFC @253398


# cfe30d02 19-Jun-2013 Gleb Smirnoff <glebius@FreeBSD.org>

Merge fresh head.


# 849d265d 09-Jun-2013 Jaakko Heinonen <jh@FreeBSD.org>

Print file names without stdio buffering to avoid mixing buffered and
unbuffered ouput.

PR: bin/176886
Reviewed by: mjg


Revision tags: release/8.4.0, release/9.1.0, release/8.3.0_cvs, release/8.3.0
# 8fa0b743 23-Jan-2012 Xin LI <delphij@FreeBSD.org>

IFC @230489 (pending review).


Revision tags: release/9.0.0
# 3ee1a36e 22-Nov-2011 Peter Grehan <grehan@FreeBSD.org>

IFC @ r227804

Pull in the virtio drivers from head.


# c7c497f1 06-Nov-2011 Ed Schouten <ed@FreeBSD.org>

Add missing static keywords to tail(1)


# fab4c373 16-Sep-2011 Peter Grehan <grehan@FreeBSD.org>

IFC @ r225592

sys/dev/bvm/bvm_console.c - move up to the new alt-break order.


12345