aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Kitt <steve@sk2.org>2021-01-28 22:51:10 +0100
committerGitHub <noreply@github.com>2021-01-28 21:51:10 +0000
commitb9e3ea01dbbbba9518da216dd29c042af871ae31 (patch)
tree2722fbcbfcf61998eec6fb9aac11cc40c3304024
parentd35470382b50aa10e4e81697b23183b50ee45941 (diff)
downloadlibfuse-b9e3ea01dbbbba9518da216dd29c042af871ae31.tar.gz
Ignore "-o nonempty" (#582)
Commit 0bef21e8543d removed "-o nonempty" since mounting over non-empty directories is always allowed. But this broke tools which specify "-o nonempty". Since the expected behaviour is the same anyway, ignoring the "nonempty" option seems safe, and allows programs specifying "-o nonempty" to continue working with fusermount3. This would fix https://bugs.debian.org/939767 Signed-off-by: Stephen Kitt <steve@sk2.org>
-rw-r--r--ChangeLog.rst7
-rw-r--r--util/fusermount.c3
2 files changed, 9 insertions, 1 deletions
diff --git a/ChangeLog.rst b/ChangeLog.rst
index ecca75d..47b993a 100644
--- a/ChangeLog.rst
+++ b/ChangeLog.rst
@@ -1,3 +1,10 @@
+Unreleased Changes
+==================
+
+* Allow "nonempty" as a mount option, for backwards compatibility with
+ fusermount 2. The option has no effect since mounting over non-empty
+ directories is allowed by default.
+
libfuse 3.10.1 (2020-12-07)
===========================
diff --git a/util/fusermount.c b/util/fusermount.c
index 243d25e..ed62ea9 100644
--- a/util/fusermount.c
+++ b/util/fusermount.c
@@ -773,7 +773,8 @@ static int do_mount(const char *mnt, const char **typep, mode_t rootmode,
blkdev = 1;
} else if (opt_eq(s, len, "auto_unmount")) {
auto_unmount = 1;
- } else if (!begins_with(s, "fd=") &&
+ } else if (!opt_eq(s, len, "nonempty") &&
+ !begins_with(s, "fd=") &&
!begins_with(s, "rootmode=") &&
!begins_with(s, "user_id=") &&
!begins_with(s, "group_id=")) {