aboutsummaryrefslogtreecommitdiffstats
path: root/src/bindfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bindfs.c')
-rw-r--r--src/bindfs.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/bindfs.c b/src/bindfs.c
index 6ba9e68..c87b3d8 100644
--- a/src/bindfs.c
+++ b/src/bindfs.c
@@ -2155,8 +2155,15 @@ int main(int argc, char *argv[])
fuse_opt_add_arg(&args, "-ouse_ino");
fuse_opt_add_arg(&args, "-oreaddir_ino");
- /* Show the source dir in the first field on /etc/mtab. */
- {
+ /* Show the source dir in the first field on /etc/mtab, to be consistent
+ with "real" filesystems.
+
+ We don't do this if the source dir contains some special characters.
+ Comma is on this list because it would mess up FUSE's option parsing
+ (issue #47). The character blacklist is likely not complete, which is
+ acceptable since this is not a security check. The aim is to avoid giving
+ the user a confusing error. */
+ if (strpbrk(settings.mntsrc, ", \t\n") == NULL) {
char *tmp = sprintf_new("-ofsname=%s", settings.mntsrc);
fuse_opt_add_arg(&args, tmp);
free(tmp);