From b9e3ea01dbbbba9518da216dd29c042af871ae31 Mon Sep 17 00:00:00 2001 From: Stephen Kitt Date: Thu, 28 Jan 2021 22:51:10 +0100 Subject: 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 --- util/fusermount.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'util/fusermount.c') 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=")) { -- cgit v1.2.3