[Bug 277027] Null-mount a single file (not a directory)

From: <bugzilla-noreply_at_freebsd.org>
Date: Tue, 13 Feb 2024 16:48:47 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=277027

--- Comment #10 from vini.ipsmaker@gmail.com ---
It also doesn't work for character/block files (mknod):

# mount_nullfs /dev/tty /tmp/mount.txt
mount_nullfs: /dev/tty: must be either a file or directory

Not the safest thing in the world to do (attack surface would be huge which
would be hard to audit), but some clients don't care about that and would like
to have containerized applications that can offload workloads to specialized
hardware anyway (GPUs being one example).

However it doesn't matter that much on FreeBSD (one can just call mknod
directly before starting the jail I guess). I'm just mentioning for the sake of
completeness because this also works on Linux (on Linux is more important
because the way user/mount namespaces work).

-- 
You are receiving this mail because:
You are the assignee for the bug.