MFC jail: unbreak the zfs.mount_snapshot option

The change of its description from integer to boolean didn't actually
change it to a boolean, but only made it impossible to set as either
a boolean or an integer.

Rather than make it work as a boolean parameter should, just revert
to the old (working) integer parameter, and change the documentation
to match.

PR:		274263
Reported by:	andrew.hotlab at hotmail

(cherry picked from commit ae1a0648b0)
This commit is contained in:
Jamie Gritton 2024-09-19 12:49:01 -07:00
parent 90ea553a0d
commit 80c5d78d90
2 changed files with 4 additions and 4 deletions

View file

@ -100,7 +100,7 @@ static struct zfs_jailparam zfs_jailparam0 = {
static int zfs_jailparam_slot;
SYSCTL_JAIL_PARAM_SYS_NODE(zfs, CTLFLAG_RW, "Jail ZFS parameters");
SYSCTL_JAIL_PARAM(_zfs, mount_snapshot, CTLTYPE_INT | CTLFLAG_RW, "B",
SYSCTL_JAIL_PARAM(_zfs, mount_snapshot, CTLTYPE_INT | CTLFLAG_RW, "I",
"Allow mounting snapshots in the .zfs directory for unjailed datasets");
SYSCTL_NODE(_vfs_zfs, OID_AUTO, version, CTLFLAG_RD, 0, "ZFS versions");

View file

@ -23,7 +23,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.Dd August 12, 2024
.Dd September 19, 2024
.Dt JAIL 8
.Os
.Sh NAME
@ -763,8 +763,8 @@ Allow access to SYSV IPC semaphore and shared memory primitives, in the
same manner as
.Va sysvmsg .
.It Va zfs.mount_snapshot
Allow jailed users to access the contents of ZFS snapshots under the
filesystem's
When set to 1, jailed users may access the contents of ZFS snapshots
under the filesystem's
.Pa .zfs
directory.
If