Page MenuHomeFreeBSD

cd9660: Unbreak symbolic links
ClosedPublic

Authored by des on Nov 5 2025, 7:19 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Dec 16, 7:46 PM
Unknown Object (File)
Sun, Dec 14, 9:39 PM
Unknown Object (File)
Wed, Dec 10, 3:09 AM
Unknown Object (File)
Sat, Nov 29, 11:50 PM
Unknown Object (File)
Fri, Nov 28, 1:01 AM
Unknown Object (File)
Wed, Nov 26, 5:37 PM
Unknown Object (File)
Mon, Nov 24, 12:34 PM
Unknown Object (File)
Mon, Nov 24, 9:42 AM

Details

Summary

Since the introduction of permission masks, cd9660_getattr() returns a
size of zero for all symbolic links, because the code to retrieve the
length of the link target (as required by POSIX) is dead, since we strip
away the type bits before we try to use them to identify the file as a
link. Address this by checking the vnode type instead.

PR: 290556
MFC after: 3 days
Fixes: 82f2275b73e5 ("cd9660: Add support for mask,dirmask,uid,gid options")

Diff Detail

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

Event Timeline

des requested review of this revision.Nov 5 2025, 7:19 PM

Looks good to me. Haven't tested it, though.

Seems fine. See also inline comment for a change that is superfluous.

sys/fs/cd9660/cd9660_vnops.c
197

The i_size to va_size test change is not necessary and seems to go opposite the flow, where vap is preferably only filled and not read from (a discipline which would have avoided the bug fixed by this very change).

This revision is now accepted and ready to land.Nov 10 2025, 2:44 AM
This revision was automatically updated to reflect the committed changes.
des marked an inline comment as done.Nov 10 2025, 1:59 PM