With mount namespaces, you can create an anonymous tmpfs mount that gets detached and deleted once nothing refers to it any more, and add whatever files you want to that. It can be accessed using the *at() syscalls, or alternatively using an initial fchdir() to make it the current directory.
Too bad that unprivileged namespaces have been buried by the big-name distros, though.
Too bad that unprivileged namespaces have been buried by the big-name distros, though.