Hello all!
I experienced the following behaviour with nullfs, and wanted to know if it's supposed to be the correct one:
I used mount_nullfs(8) to share my /tmp directory with a Linux chroot (/compat/linux/tmp).
My /tmp filesystem is mounted with these options:
and this is how mount(8) reports the options of the nullfs mount (
However, when I tried to execute a binary that I temporarily placed in /compat/linux/tmp it was flawlessly executed, with my surprise!
I observed this behaviour even outside of the chroot, and with regular datasets, so it's not something related to the fact that /tmp is a tmpfs(5).
To prevent this, I must explicitly use
Since the ouput of mount(8) reports the correct options (in both cases), shouldn't this mean that mount_nullfs(8) must respect the noexec option of the filesystem mounted on its target directory to its own mountpoint (like it does, e.g. for the readonly flag)?
Thank you in advance for your response!
I experienced the following behaviour with nullfs, and wanted to know if it's supposed to be the correct one:
I used mount_nullfs(8) to share my /tmp directory with a Linux chroot (/compat/linux/tmp).
My /tmp filesystem is mounted with these options:
Code:
tmpfs on /tmp (tmpfs, local, noexec, nosuid)
mount -t nullfs /tmp /compat/linux/tmp
):
Code:
/tmp on /compat/linux/tmp (nullfs, local, noexec, nosuid)
I observed this behaviour even outside of the chroot, and with regular datasets, so it's not something related to the fact that /tmp is a tmpfs(5).
To prevent this, I must explicitly use
-o noexec
with mount_nullfs(8); this way I get the behaviour I expected.Since the ouput of mount(8) reports the correct options (in both cases), shouldn't this mean that mount_nullfs(8) must respect the noexec option of the filesystem mounted on its target directory to its own mountpoint (like it does, e.g. for the readonly flag)?
Thank you in advance for your response!