diff --git a/lib/libjail/jail.c b/lib/libjail/jail.c index 3dd87b1072d1..dc7fdf1479bd 100644 --- a/lib/libjail/jail.c +++ b/lib/libjail/jail.c @@ -1050,10 +1050,18 @@ kldload_param(const char *name) kl = kldload(name); else if (strncmp(name, "allow.mount.", 12) == 0) { /* Load the matching filesystem */ - kl = kldload(name + 12); + const char *modname; + + if (strcmp("fusefs", name + 12) == 0 || + strcmp("nofusefs", name + 12) == 0) { + modname = "fuse"; + } else { + modname = name + 12; + } + kl = kldload(modname); if (kl < 0 && errno == ENOENT && - strncmp(name + 12, "no", 2) == 0) - kl = kldload(name + 14); + strncmp(modname, "no", 2) == 0) + kl = kldload(modname + 2); } else { errno = ENOENT; return (-1);