bug(find): when -files0-from is /dev/vhost-net or /dev/vhost-vsock it silences errors

Open
#780 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
55/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
rust
Domain
cli

Research direction

Reproduce the commands using /dev/vhost-net and /dev/vhost-vsock, then compare their output and exit status with GNU find. Trace handling of the -files0-from input and read errors; done means these inputs report the read error and return the expected nonzero status.

Written by the indexing model from the issue text.

Description

good first issue

Hi, findutils mainteners

we confirmed the find utility, silences errors, while the gnu correctly output them

relunsec@relunsec:~/software/findutils/target/debug$ sudo /bin/find -files0-from /dev/vhost-vsock
/bin/find: ‘/dev/vhost-vsock’: read error: File descriptor in bad state
relunsec@relunsec:~/software/findutils/target/debug$ sudo /bin/find -files0-from /dev/vhost-net
/bin/find: ‘/dev/vhost-net’: read error: File descriptor in bad state
relunsec@relunsec:~/software/findutils/target/debug$ sudo ./find -files0-from /dev/vhost-net
relunsec@relunsec:~/software/findutils/target/debug$ sudo ./find -files0-from /dev/vhost-vsock
relunsec@relunsec:~/software/findutils/target/debug$ sudo ./find -files0-from /dev/vhost-vsock
relunsec@relunsec:~/software/findutils/target/debug$ echo $?
0
relunsec@relunsec:~/software/findutils/target/debug$ 
Dominant language
Rust
Stars
649
Forks
101
Avg merge
2d 21h
Merged PRs (30d)
11

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from uutils/findutils

All issues in uutils/findutils

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.