Page MenuHomeFreeBSD

realpath: Report correct path on failure
ClosedPublic

Authored by des on Oct 10 2025, 2:05 PM.
Tags
None
Referenced Files
F175201290: D53025.diff
Fri, Oct 9, 1:40 AM
Unknown Object (File)
Wed, Oct 7, 1:38 AM
Unknown Object (File)
Tue, Oct 6, 2:22 PM
Unknown Object (File)
Mon, Oct 5, 4:00 PM
Unknown Object (File)
Sun, Oct 4, 1:29 AM
Unknown Object (File)
Sat, Oct 3, 9:13 PM
Unknown Object (File)
Sat, Oct 3, 6:32 PM
Unknown Object (File)
Mon, Sep 28, 6:07 AM
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 67699
Build 64582: 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.