Date: Thu, 15 Nov 2018 19:06:07 +0000 (UTC) From: Alan Somers <asomers@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r340462 - stable/12/lib/libjail Message-ID: <201811151906.wAFJ67a5034310@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201811151906.wAFJ67a5034310>