qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Make 9pfs buildable for Windows


From: Michael Fritscher
Subject: Re: [Qemu-devel] Make 9pfs buildable for Windows
Date: Sun, 15 Oct 2017 22:00:16 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0

On 15.10.2017 21:50, Greg Kurz wrote:

>> Hi again,
>>
>> I see one thing: symlinks somewhere in the path (which seemed to be the
>> reason introducing the *at family). But I think that this can be handled
>> by canonlizing the path, too. realpath should do the job quite well.
>>
> 
> Unfortunately now because we have TOCTOU condition here: some path element
> could be replaced by a symlink after realpath() but before we actually pass
> the resulting path to a syscall.

Ah, yes, you are right. So lets go on the "hard way" (ntdll) again.

This approach seems to work in general, but somehow I get stack
corrumption or something like that after returning from a function which
makes the relativ NTOpenFile call. But should be fixable. Then the big
work piece is to emulate posix behavior with NT* functions *g*

Michael Fritscher



reply via email to

[Prev in Thread] Current Thread [Next in Thread]