| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
On non-Linux systems, bfs_check_capabilities always returned -1, so
cpath_has_capabilities would always return true. If bfs was called with
an LS_COLORS containing the `ca` statement, e.g. `ca=30;41`, bfs would
color ALL the files. While including the `ca` statement in LS_COLORS
on non-Linux systems is unusual, this is not an error and is a valid
use-case (e.g. Using GNU ls or lsd).
Fixes: 1520d4d3 ("color: Don't color files like directories on ENOTDIR")
|
|
|
|
| |
Fixes: https://github.com/tavianator/bfs/issues/145
|
|
|
|
| |
Link: https://savannah.gnu.org/bugs/?66365
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, given
$ touch file
$ ln -s file/file notdir
$ bfs notdir/file
bfs would loop forever when printing the error message, since it
expected stripping the trailing slash from "notdir/" to fix the ENOTDIR
error, but the broken symlink still gave the same error.
Fixes: b4c3201 ("color: Only highlight the trailing slash on ENOTDIR")
|
| |
|
| |
|
|
|
|
|
|
|
| |
This was causing a UAF if we ever unregistered the last hook for a
signal and then re-registered one.
Fixes: 75b7f70 ("sighook: Make sigunhook() O(1)")
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Leading NUL bytes (e.g. `*\0.gz=...`) could cause us to insert a
non-prefix-free set of strings into the case-insensitive extension trie,
which would lead to crashes like
bfs: trie_split@src/trie.c:538: Assertion failed: `key_nibble != rep_nibble`
and OOB accesses to trie leaf keys. Fix it by ignoring those
extensions, since filenames cannot contain NUL bytes.
Fixes: 08030aea ("color: Delay the case_sensitive decision")
|
| |
|
|
|
|
|
|
|
| |
When optimizing -not \( -a , -b \), the child is a comma expression, not
the parent.
Fixes: 4a36bb9 ("expr: Make expressions variadic")
|
| |
|
|
|
|
|
|
| |
This replaces the explicit CPPFLAGS list in flags.mk with just
`-include src/prelude.h`, shortening our compiler command lines and
allowing them to be easily documented.
|
| |
|
|
|
|
|
| |
In most cases, it's not too annoying to specify a message. For
tests/bit.c, we can manually polyfill the 1-argument version.
|
| |
|
| |
|
| |
|
|
|
|
| |
clock_gettime() is available everywhere by now.
|
|
|
|
|
|
|
| |
POSIX 2024 clarified that find(1) is meant to work exactly like chmod(1)
here, so for modes like +rw,-x with no "who" specified, apply the umask.
Link: https://www.austingroupbugs.net/view.php?id=1392
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
This reverts commit 4f80c17192f2b28c96a489969d4435151d68d0ce.
Link: https://www.austingroupbugs.net/view.php?id=1133
|
|
|
|
| |
Link: https://www.austingroupbugs.net/view.php?id=243
|
|
|
|
| |
Link: https://www.austingroupbugs.net/view.php?id=1031
|
|
|
|
|
| |
It's a little awkward to thread the test result through manually; much
easier to just make bfs_check() update a global variable.
|
|
|
|
|
|
|
|
| |
This fixes an ABA problem where sigdispatch() could think no handlers
are registered for a signal even when there are.
Link: https://unix.stackexchange.com/a/779594/56202
Fixes: 375caac ("sighook: New utilities for hooking signals")
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Not all posix_spawn() implementations use errno to report execv()
failures from the child process, as that requires either a kernel
posix_spawn() implementation or a pipe to pass the error back.
This should fix tests/posix/exec_nonexistent on OpenBSD and HPPA.
Link: https://buildd.debian.org/status/fetch.php?pkg=bfs&arch=hppa&ver=3.3.1-1&stamp=1717489148&raw=0
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
POSIX requires an error if (for example) -L encounters a symlink loop.
The GNU find change was restricted to -xtype, so add a manual ELOOP test
to eval_xtype() for compatibility.
This reverts commit 470589cbd9ca3e73d8c01ac3a96cbc065179dcc5.
Link: https://savannah.gnu.org/bugs/?19605
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The POSIX Utility Syntax Guidelines specify that flag groups like -HL
should be handled like -H -L. GNU find doesn't support grouping flags
in this way, but BSD find does.
To avoid conflicts with non-flag primaries, for now we require at least
one flag in a group to be a capital letter. That is, we support things
like -Lds but not -ds. We also do not support -fPATH (without a space)
as it would conflict with -follow, -fprint, etc. It is impossible to be
compatible with both GNU and BSD find here:
user@gnu$ find -follow
link
link/file
...
user@bsd$ find -follow
find: ollow: No such file or directory
Link: https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap12.html
|
| | |
|
|/
|
|
|
|
|
|
|
|
| |
Based on the latest C23 draft (N3220):
- Argument types to generic bit functions should be unsigned
- Bit functions return unsigned int
- Byte-swapping functions (stdc_memreverse8*()) weren't added
- stdc_rotate_{left,right}() weren't added
- first_leading_*() counts from the *left*
|
|
|
|
| |
Closes: https://github.com/tavianator/bfs/issues/21
|
| |
|