Commit 7ab040d
committed
chcon: walk directories with DirFd instead of fts
Reuse uucore::safe_traversal, the same traversal chown and chgrp already
use, in place of fts(3). Directories are still labelled post-order, so a
context that forbids reading one is applied only once its contents are
done.
Cycles are now caught with a set of the directories open on the current
path rather than FTS_DC, and the stale-stat retry goes away: entries are
stat'ed when they are visited rather than when the walk is opened.
chcon was the only fts-sys user in the workspace, so the dependency goes
with it.1 parent 1d3ee39 commit 7ab040d
4 files changed
Lines changed: 178 additions & 489 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | 26 | | |
28 | 27 | | |
29 | 28 | | |
| |||
0 commit comments