/var/empty on Linux
Does anyone know what the equivalent of /var/empty is on Linux?
I wrote a program that chroots for security reasons. After initialisation it doesn't need to open any more files or devices, so chrooting to an empty directory would work just fine. On FreeBSD and OpenBSD I have the /var/empty directory for exactly this reason. IIRC it's even protected with the system immutable flag to prevent accidental writes.
On my CentOS 7 machine I have a /var/empty, but that has an (empty) sshd directory in it (?) On Ubuntu 15.04 I don't have a /var/empty at all.
Do I need to create a useless and empty /var/run/myprogram directory? Or is there some equivalent?
__________________
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things.
|