Date: Sat, 10 Nov 2018 03:10:22 +0000 (UTC) From: Alan Somers <asomers@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r340314 - head/lib/libjail Message-ID: <201811100310.wAA3AM2O001557@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: asomers Date: Sat Nov 10 03:10:22 2018 New Revision: 340314 URL: https://svnweb.freebsd.org/changeset/base/340314 Log: 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 MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D17929 Modified: head/lib/libjail/jail.c Modified: head/lib/libjail/jail.c ============================================================================== --- head/lib/libjail/jail.c Sat Nov 10 03:00:36 2018 (r340313) +++ head/lib/libjail/jail.c Sat Nov 10 03:10:22 2018 (r340314) @@ -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?201811100310.wAA3AM2O001557>