FUSE no longer allows empty string for "source" with new mount API

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Calling mount(2) and passing an empty string for the "source" parameter
when mounting a FUSE filesystem used to work.

However, it seems after the migration to the new mount API, passing an
empty string for "source" with mount(2) no longer works, since the new
mount API actually parses the "source" parameter and doesn't allow an
empty string. This breaks users of FUSE which don't go through libfuse,
so it seems like a userspace-visible regression.

I haven't bisected to confirm that it's specifically the new mount API
which is the problem, just seen that it works on some old kernels and
fails on some kernels after

commit c30da2e981a703c6b1d49911511f7ade8dac20be
Author: David Howells <dhowells@xxxxxxxxxx>
Date:   Mon Mar 25 16:38:31 2019 +0000

    fuse: convert to use the new mount API

so apologies if the culprit turns out to be something else.

I'd try to fix it myself, but I'm not sure how to completely ignore a
parameter with the new mount API - I assume that with the new mount API,
we need to explicitly handle "source", so something like the below
simple patch won't work.

Thanks,
Spencer Baugh

---
1 file changed, 8 deletions(-)
fs/fuse/inode.c | 8 --------

modified   fs/fuse/inode.c
@@ -449,7 +449,6 @@ enum {
 };
 
 static const struct fs_parameter_spec fuse_fs_parameters[] = {
-	fsparam_string	("source",		OPT_SOURCE),
 	fsparam_u32	("fd",			OPT_FD),
 	fsparam_u32oct	("rootmode",		OPT_ROOTMODE),
 	fsparam_u32	("user_id",		OPT_USER_ID),
@@ -473,13 +472,6 @@ static int fuse_parse_param(struct fs_context *fc, struct fs_parameter *param)
 		return opt;
 
 	switch (opt) {
-	case OPT_SOURCE:
-		if (fc->source)
-			return invalfc(fc, "Multiple sources specified");
-		fc->source = param->string;
-		param->string = NULL;
-		break;
-
 	case OPT_SUBTYPE:
 		if (ctx->subtype)
 			return invalfc(fc, "Multiple subtypes specified");




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux