On Mar 20 15:51, Corinna Vinschen wrote:
> 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.

...and if Microsoft actually changes that at one point, your fallback
code will still work :)


Corinna

Reply via email to