opnsense-src/bin
Dag-Erling Smørgrav a8aaf8039f cp: Avoid closing an invalid file descriptor.
* At the end of copy(), we always close to.dir, even though it can be
  AT_FDCWD (in the file-to-file case) or even -1 (if we failed to open
  or create the destination directory).  While closing an invalid file
  descriptor is harmless, it's still bad form.
* In the DIR_TO_DNE case, initialize to.dir to -1 to guard against the
  case where mkdir() fails so we never assign anything to to.dir and
  end up (harmlessly, luckily) closing stdin on our way to the exit.

Coverity ID:	1609954
Fixes:		82fc0d09e8
Sponsored by:	Klara, Inc.
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D50391
2025-05-18 21:10:08 +02:00
..
cat cat: report copy_file_range() errors with the read filename 2024-12-13 22:32:54 -06:00
chflags Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
chio Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
chmod Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
cp cp: Avoid closing an invalid file descriptor. 2025-05-18 21:10:08 +02:00
cpuset Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
csh csh: Remove gethost dependency on tc.const.h 2025-02-08 19:30:55 -05:00
date date: Documentation nits. 2024-09-10 14:29:14 +02:00
dd Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
df Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
domainname Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
echo Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
ed Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
expr Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
freebsd-version Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
getfacl getfacl: implement --skip-base (-s) 2025-04-20 22:57:45 -05:00
hostname tests: Switch bin/hostname/hostname_test to execenv=jail 2024-10-31 17:44:49 +00:00
kenv Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
kill kill.1: mention special meaning of PGID as a PID 2025-01-19 15:31:36 +02:00
ln ln: Tweak append logic. 2025-04-15 19:57:52 +02:00
ls ls: --group-directories requires stat information 2025-01-22 08:29:29 +01:00
mkdir Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
mv mv: Add test cases for command-line options. 2024-11-19 10:29:15 +01:00
nproc Update Makefile.depend files 2024-10-14 10:26:17 -07:00
pax pax: Clear arcn in each read function. 2024-07-24 22:07:06 +02:00
pkill pkill tests: Fix pkill usage in the pkill -x test 2025-03-20 02:52:49 +00:00
ps ps.1: Remove ambiguity in description of option '-J' 2025-05-07 11:14:55 +02:00
pwait pwait tests: Fix some exit annotations 2025-04-18 15:44:15 +00:00
pwd Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
realpath Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
rm Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
rmail Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
rmdir manuals: Fix "unusual .Xr" warnings with a script 2024-10-15 17:18:14 -03:00
setfacl Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
sh sh: Avoid referencing uninitialized memory in alias 2025-05-16 11:03:09 -03:00
sleep Update Makefile.depend files 2024-10-14 10:26:17 -07:00
stty Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
sync Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
test test(1): quote closing bracket in error message 2024-07-29 14:08:33 -06:00
tests Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
timeout timeout(1): Document the reaper implementation and behaivor 2025-04-16 21:45:38 +02:00
uuidgen Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
Makefile Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
Makefile.inc Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00