On Thu, Feb 7, 2019 at 11:22 AM Brian Ledbetter <[email protected]>
wrote:

>
>
> On Thursday, February 7, 2019 at 3:48:32 AM UTC-5, Nadav Har'El wrote:
>
>> To support the case where the /etc filesystem is read-only, we can do the
>> following: In the read-only filesystem, put in /etc/resolv.conf a symbolic
>> link to /tmp/resolv.conf, assuming we always mount a writable /tmp. Then,
>> when dhcp.cc will write to "/etc/resolv.conf" (overwritten, e.g., open()
>> with O_TRUNC), it will actually write to that file on /tmp and succeed.
>>
>
> Ha - That's quite a bit easier than the path I was thinking of, trying to
> write some sort of mmap'ed VFS hack to point /etc/resolv.conf to a blob of
> kernel memory. This is definitely a better approach.
>
> Are we guaranteed that every OSv instance will have a writable /tmp
> directory?  Is that a part of the core manifest?
>

This is a question for Waldek, who's the expert (and author) of the
readonly-filesystem stuff. But I seem to remember it is - that we always
mount a writeable, in-memory, file system, because many applications assume
they can write stuff there. If we don't do that yet, maybe we should?

You can test this by building an image with "fs=rofs". For example,

scripts/build fs=rofs image=rogue

-- 
You received this message because you are subscribed to the Google Groups "OSv 
Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to