svn commit: r340462 - stable/12/lib/libjail
Alan Somers
asomers at FreeBSD.org
Thu Nov 15 19:06:09 UTC 2018
Author: asomers
Date: Thu Nov 15 19:06:07 2018
New Revision: 340462
URL: https://svnweb.freebsd.org/changeset/base/340462
Log:
MFC r340314:
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.
Reviewed by: jamie
Approved by: re (gjb)
Differential Revision: https://reviews.freebsd.org/D17929
Modified:
stable/12/lib/libjail/jail.c
Directory Properties:
stable/12/ (props changed)
Modified: stable/12/lib/libjail/jail.c
==============================================================================
--- stable/12/lib/libjail/jail.c Thu Nov 15 18:51:37 2018 (r340461)
+++ stable/12/lib/libjail/jail.c Thu Nov 15 19:06:07 2018 (r340462)
@@ -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);
More information about the svn-src-all
mailing list