Page MenuHomeFreeBSD

readlinkat(2): allow O_PATH fd
ClosedPublic

Authored by kib on Oct 9 2021, 5:16 AM.
Tags
None
Referenced Files
F162058616: D32390.id96562.diff
Thu, Jul 9, 8:14 AM
F161994176: D32390.diff
Wed, Jul 8, 6:11 PM
Unknown Object (File)
Sun, Jul 5, 4:46 AM
Unknown Object (File)
Fri, Jul 3, 5:16 PM
Unknown Object (File)
Fri, Jul 3, 11:05 AM
Unknown Object (File)
Thu, Jul 2, 10:07 AM
Unknown Object (File)
Wed, Jul 1, 7:25 AM
Unknown Object (File)
Mon, Jun 29, 7:12 PM
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.