Page MenuHomeFreeBSD

readlinkat(2): allow O_PATH fd
ClosedPublic

Authored by kib on Oct 9 2021, 5:16 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Feb 27, 11:38 PM
Unknown Object (File)
Fri, Feb 27, 5:48 PM
Unknown Object (File)
Feb 19 2026, 4:51 AM
Unknown Object (File)
Feb 16 2026, 6:29 PM
Unknown Object (File)
Feb 8 2026, 1:33 PM
Unknown Object (File)
Feb 7 2026, 7:46 PM
Unknown Object (File)
Feb 7 2026, 7:06 PM
Unknown Object (File)
Jan 31 2026, 7:39 AM
Subscribers

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kib requested review of this revision.Oct 9 2021, 5:16 AM

I tested it, and seems to resolve the PR 258856. If you could reference the PR in the commit message that'll be great.

Appreciate your quick follow-up.

Thank you!

This revision is now accepted and ready to land.Oct 9 2021, 3:43 PM

What does it have to do with O_PATH fds? After this patch readlinkat(fd, "", buf, bufsz) will succeed even if fd is opened without O_PATH, I believe.

What does it have to do with O_PATH fds? After this patch readlinkat(fd, "", buf, bufsz) will succeed even if fd is opened without O_PATH, I believe.

We do not allow opening symlink without O_PATH. See the very beginning of vn_open_vnode().

This revision was automatically updated to reflect the committed changes.