On Sat Feb 17 01:55:57 2024 +0000, Jinoh Kang wrote:
You would be right if the app used the resolved pathname (`\?\unix\proc\123\fd\456`) for opening *only*. This will automatically dereference the symlink, and the # of dereferences (before or after `get_handle_unix_name`) will be irrelevant. OTOH, what if the app doesn't want to dereference (à la O_NOFOLLOW) it at all? If you allow me to speculate, it could assume the pathname to be fully resolved, and become unhappy if it found out `\?\unix\proc\123\fd\456` is a symlink. I don't want to speculate here. I'd rather just wait for @insn to come up with a concrete use case,[^1] along with tests.[^2] [^1]: Looks like something along CPython calling GetFileInformationHandle, but I'm not sure how this is relevant. [^2]: Standalone tests (as an MR attachment, outside winetest) should be enough.
Maybe, but that's very much a "what if". It also makes more sense than trying to dereference the symlink exactly once.