Implement `/dev/local_storage` and `/dev/session_storage`
/dev/local_storage
is a directory that has a file for each item in localStorage
. Reading from such a file yields the item's value, writing to the file sets the value, unlinking a file from /dev/local_storage
deletes the corresponding item. /dev/session_storage
behaves similarly, but works with sessionStorage
.
/dev/session_storage
and all files inside it should have 0o666
permission mode set. localStorage
, however, is going to be used by Wubix for storing initramfs and potentially kernel parameters, so for the wubixInitramfs
and wubixKernelParameters
the permission mode should be 0o600
, and for all others it should be 0o666
. /dev/local_storage
should refuse to unlink the special-cased items from localStorage
unless it's being done by root.