freebsd-dev/usr.bin/tail
Mariusz Zaborski c851fce6d7 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
2019-06-09 22:55:21 +00:00
..
tests Drop "All rights reserved" from the files I own 2019-03-11 22:23:56 +00:00
extern.h tail: fix the checks if the file was rotated 2019-06-09 22:55:21 +00:00
forward.c tail: fix the checks if the file was rotated 2019-06-09 22:55:21 +00:00
Makefile tail: disable capsicum in rescue mode 2019-06-05 22:55:00 +00:00
Makefile.depend DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
misc.c tail: fix the checks if the file was rotated 2019-06-09 22:55:21 +00:00
read.c tail: fix the checks if the file was rotated 2019-06-09 22:55:21 +00:00
reverse.c tail: fix the checks if the file was rotated 2019-06-09 22:55:21 +00:00
tail.1 tail(1): Address mandoc concern (space before punctuation after macro) 2018-04-10 14:42:24 +00:00
tail.c tail: fix the checks if the file was rotated 2019-06-09 22:55:21 +00:00