This is what I recorded in the jail (which has mount.devfs set):
From outside the jail, I can see da0 (a USB flash memory device for testing) was indeed destroyed. Is there a way to prevent gpart from writing to media (other than writing a devfs rule file for the jail)? And also, what kind of other (to gpart) ways are there to workaround kern.securelevel?
Code:
# sysctl kern.securelevel
kern.securelevel: 3
# dd if=/dev/zero of=/dev/da0
dd: /dev/da0: Operation not permitted
# gpart destroy -F da0
da0 destroyed
#
From outside the jail, I can see da0 (a USB flash memory device for testing) was indeed destroyed. Is there a way to prevent gpart from writing to media (other than writing a devfs rule file for the jail)? And also, what kind of other (to gpart) ways are there to workaround kern.securelevel?