[PATCH 0/3] fix unlink/rename failure in hyper-v container
Corinna Vinschen
corinna-cygwin@cygwin.com
Mon Mar 20 14:51:24 GMT 2023
On Mar 20 22:06, Yoshinao Muramatsu wrote:
> On 2023/03/18 19:01, Corinna Vinschen wrote:
> > FILE_SUPPORTS_OPEN_BY_FILE_ID flag is missing.
> >
> > NTFS always supports this since Windows 2003! So we could
> > use this flag as indicator that, probably, POSIX rename/unlink
> > won't work.
>
> I thought that if there was no FILE_SUPPORTS_OPEN_BY_FILE_ID
> and OpenByFileId() worked, it would be a Signature,
> but the result was different.
>
> I tested OpenByFileID() on a bind-mounted directory, it was failed.
> Maybe it's because of the path isolation.
> ltsc2022 process isolation says "I support it" but it not works.
> Okay, it's not a security issue. So now I'm writing this here.
>
> Unfortunately, the state of the FILE_SUPPORTS_OPEN_BY_FILE_ID flag
> does not match the actual behavior, so I fear it may be corrected.
Actually, it doesn't matter if open by fileID works. The fact that
this flag is missing *is* a pattern we can use. It allows us to
distinguish the hyper-v isolated NTFS from a standard NTFS and thus,
we can immediately do the right thing.
> ps
> Corinna, I read the new email about fs_info::update patch
> you posted while I was writing this.
> I will report back when I test it, but it may take some time
> as I usually use msys2 and don't have a cygwin development environment.
No worries!
Corinna
More information about the Cygwin-patches
mailing list