bug: find panic when a file owner or uid invalid with -ls

未关闭 适合新手
#692 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
76/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
冷清
技术栈
rust
领域
cli

调研方向

从 src/find/matchers/ls.rs 的第 155 行开始,使用 issue 中的命令,通过无效的 owner 或 UID 重现该失败。检查失败的 unwrap,并为 find /tmp/panic_file -ls 添加覆盖。完成的标准是该命令不再 panic,并以类似 GNU find 的方式报告文件。

由索引模型根据 Issue 内容生成。

描述

Hi, findutils mainteners

we reproduced that via

$ touch /tmp/panic_file
$ sudo chown 9999:9999 /tmp/panic_file

as i see a panic

relunsec@relunsec:~/software/findutils$ ./target/release/find /tmp/panic_file -ls

thread 'main' (154111) panicked at src/find/matchers/ls.rs:155:48:
called `Result::unwrap()` on an `Err` value: ENOENT
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

but the gnu version it fully works

relunsec@relunsec:~/software/findutils$ /bin/find /tmp/panic_file -ls
    13327      0 -rw-rw-r--   1 9999     9999            0 Jun  4 12:34 /tmp/panic_file
主要语言
Rust
星标
653
派生
115
平均合并
1 天 6 小时
30 天内合并 PR
24

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

uutils/findutils 的其他 Issue

查看 uutils/findutils 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。