#7888 aims to make mountpoint directories "safer" against mis-use (e.g., writing to the directory before the dataset-under-interest is mounted).
To do this, we want to:
- Check if immutability is supported (currently via
ls -d/v)
- Make the directory mutable/immutable (via
chmod S+ci)
It should be possible to accomplish this with native bindings to illumos, but I think this will required bindings to https://illumos.org/man/2/acl (sys/acl.h).