Page MenuHomeFreeBSD

libjail: fix handling of allow.mount.fusefs in jailparam_init
ClosedPublic

Authored by asomers on Nov 9 2018, 7:01 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Mar 22, 9:20 PM
Unknown Object (File)
Fri, Mar 22, 9:20 PM
Unknown Object (File)
Fri, Mar 22, 9:20 PM
Unknown Object (File)
Fri, Mar 22, 9:20 PM
Unknown Object (File)
Mar 8 2024, 8:10 AM
Unknown Object (File)
Feb 25 2024, 10:58 PM
Unknown Object (File)
Feb 8 2024, 4:32 AM
Unknown Object (File)
Jan 11 2024, 10:50 PM
Subscribers

Details

Summary

libjail: fix handling of allow.mount.fusefs in jailparam_init

fusefs is inconsistently named. The kernel module is named "fuse", but the
mount helper is named "mount_fusefs" and the jail(8) parameter is named
"allow.mount.fusefs". Special case it in libjail.

Test Plan

Tested by hand on head. Started a jail with allow.mount.fusefs=1 and fuse(4)
not loaded. Relied on libjail to kldload fuse.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 20726
Build 20136: arc lint + arc unit

Event Timeline

It works with allow.mount.fusefs, but not with allow.mount.nofusefs (which will still try to kldload "fusefs"). Comparing the fs name to both "fusefs" and "nofusefs" should be all that's needed.

Of course, stupid me. But I'm having trouble testing it. What's the proper way to pass the "nofuse" option on the jail(8) command line? Neither allow.mount.nofusefs nor allow.mount.nofusefs=1 work.

It's allow.mount.nofusefs. It should (currently) work once the kld is loaded, but the new strcmp will need to be added to make it work before it's loaded.

lib/libjail/jail.c
1055

This only needs to be a strcmp, since "fusefs" is at the end of the parameter name.

Handle allow.mount.nofusefs too

This revision is now accepted and ready to land.Nov 10 2018, 2:47 AM
This revision was automatically updated to reflect the committed changes.