opnsense-src/bin
Kyle Evans 587dacce01 cp: fix -R recursion detection
The correct logic is a lot simpler than the previous iteration.  We
record the base fts_name to avoid having to worry about whether we
needed the root symlink name or not (as applicable), then we can simply
shift all of that logic to after path translation to make it less
fragile.

If we're copying to DNE, then we'll have swapped out the NULL root_stat
pointer and then attempted to recurse on it.  The previously nonexistent
directory shouldn't exist at all in the new structure, so just back out
from that tree entirely and move on.

The tests have been amended to indicate our expectations better with
subdirectory recursion.  If we copy A to A/B, then we expect to copy
everything from A/B/* into A/B/A/B, with exception to the A that we
create in A/B.

Reviewed by:	bapt
Sponsored by:	Klara, Inc.

(cherry picked from commit f00f8b4fbd)
2022-04-23 22:51:28 -05:00
..
cat cat: style nits 2021-01-20 18:46:26 +01:00
chflags fts_read: Handle error from a NULL return better. 2020-12-08 23:38:26 +00:00
chio pkgbase: Put chio in utilities 2021-06-30 09:24:32 +02:00
chmod fts_read: Handle error from a NULL return better. 2020-12-08 23:38:26 +00:00
cp cp: fix -R recursion detection 2022-04-23 22:51:28 -05:00
csh vfs: add restrictions to read(2) of a directory [1/2] 2020-06-04 18:09:55 +00:00
date date: Capitalize seconds string in synopses 2021-11-07 18:55:22 +01:00
dd Add O_DIRECT flag to DD for cache bypass 2020-06-04 20:47:11 +00:00
df bin/df: allow -t option to be used together with -l 2022-03-04 20:49:21 +01:00
domainname pkgbase: Put yellow pages programs to its own package 2022-01-05 18:23:51 +01:00
echo echo(1): Replace errexit() with err(3) 2022-01-07 14:12:12 +01:00
ed ed(1): Add two references in the SEE ALSO section 2021-04-16 16:25:25 +02:00
expr expr(1): Fix overflow detection when operand is INTMAX_MIN 2018-04-14 04:35:10 +00:00
freebsd-version freebsd-version(1): Add -j flag to support jails 2021-10-08 11:29:07 -05:00
getfacl bin/setfacl: Little refactoring, no functional change. 2020-11-23 17:00:06 +00:00
hostname hostname: avoid strcpy() overlap in -d flag handling 2021-10-03 00:14:58 -05:00
kenv kenv: allow listing of static kernel environments 2021-08-26 01:35:33 -05:00
kill General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
ln General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
ls ls(1): Allow LSCOLORS to specify an underline 2022-03-26 14:18:19 +01:00
mkdir src/bin/mkdir: Spell occur correctly. 2021-11-18 21:52:21 -07:00
mv General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
pax pax(1): Remove a few double words in source code comments 2022-04-14 08:17:16 +02:00
pkill bin/pkill: Fix {pgrep,pkill}-j_test.sh 2021-03-17 09:57:15 +00:00
ps ps: fix ps -aa 2022-03-22 19:46:40 +01:00
pwait Fix typo in pwait.c introduced in 5bdce6ff54 2021-01-21 21:43:27 +00:00
pwd pwd(1): Add EXAMPLES section 2020-10-24 16:42:35 +00:00
realpath realpath(1): Add EXAMPLES section. 2020-10-20 13:15:26 +00:00
rm fts_read: Handle error from a NULL return better. 2020-12-08 23:38:26 +00:00
rmail DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
rmdir General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
setfacl Remove unused headers. 2020-12-12 02:26:43 +00:00
sh sh: fix autocompletion for commands that share name with a directory 2022-04-13 21:01:04 +02:00
sleep Soften caveat about fractional seconds for sleep(1) 2020-12-31 19:18:20 -08:00
stty Replace sscanf() by strtoul() 2020-12-27 22:32:22 +01:00
sync DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
test Remove unused includes. 2020-12-22 21:04:36 -08:00
tests Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installed 2016-05-04 23:20:53 +00:00
uuidgen pkgbase: Create a FreeBSD-utilities package and make it the default one 2019-09-05 14:15:47 +00:00
Makefile Remove rcmds. 2017-10-06 08:43:14 +00:00
Makefile.inc build: provide a default WARNS for all in-tree builds 2020-09-18 17:17:46 +00:00