Page MenuHomeFreeBSD

realpath: Report correct path on failure
ClosedPublic

Authored by des on Oct 10 2025, 2:05 PM.
Tags
None
Referenced Files
F162441068: D53025.diff
Mon, Jul 13, 7:49 AM
F162411059: D53025.diff
Mon, Jul 13, 12:11 AM
Unknown Object (File)
Mon, Jul 6, 9:52 PM
Unknown Object (File)
Tue, Jun 23, 12:15 PM
Unknown Object (File)
Mon, Jun 22, 11:05 PM
Unknown Object (File)
Thu, Jun 18, 10:14 PM
Unknown Object (File)
May 20 2026, 4:10 AM
Unknown Object (File)
May 17 2026, 2:07 PM
Subscribers

Details

Summary

If lstat() fails with EACCES or ENOTDIR, the path we need to return in
the caller-provided buffer is that of the parent directory (which is
either unreadable or not a directory; the latter can only happen in the
case of a race) rather than that of the child we attempted to stat.

Sponsored by: Klara, Inc.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 67702
Build 64585: arc lint + arc unit

Event Timeline

des requested review of this revision.Oct 10 2025, 2:05 PM
This revision is now accepted and ready to land.Oct 10 2025, 7:13 PM
This revision was automatically updated to reflect the committed changes.