From: Stephen Kitt Date: Thu, 28 Jan 2021 21:51:10 +0000 (+0100) Subject: Ignore "-o nonempty" (#582) X-Git-Tag: fuse-3.10.2~2 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=b9e3ea01dbbbba9518da216dd29c042af871ae31;p=qemu-gpiodev%2Flibfuse.git 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 --- 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=")) {