From 57bf44355fd84d61dd35f8823ff1b506bf04a998 Mon Sep 17 00:00:00 2001
From: tenzap <46226844+tenzap@users.noreply.github.com>
Date: Sun, 15 Sep 2019 17:56:56 +0200
Subject: [PATCH] Whitelist UFSD (#451)

---
 ChangeLog.rst     | 2 ++
 util/fusermount.c | 1 +
 2 files changed, 3 insertions(+)

diff --git a/ChangeLog.rst b/ChangeLog.rst
index d46fe29..1007477 100644
--- a/ChangeLog.rst
+++ b/ChangeLog.rst
@@ -1,6 +1,8 @@
 Unreleased Changes
 ==================
 
+* Added UFSD to whitelist (so users can now mount FUSE filesystems
+  on mountpoints within UFSD filesystems).
 * Added custom log message handler function support so that libfuse
   applications can direct messages to syslog(3) or other logging systems.
   stderr remains the default.  See `fuse_log.h` for the new API.
diff --git a/util/fusermount.c b/util/fusermount.c
index 56da6ec..9f2ad88 100644
--- a/util/fusermount.c
+++ b/util/fusermount.c
@@ -1042,6 +1042,7 @@ static int check_perm(const char **mntp, struct stat *stbuf, int *mountpoint_fd)
 		0x73717368 /* SQUASHFS_MAGIC */,
 		0x01021994 /* TMPFS_MAGIC */,
 		0x24051905 /* UBIFS_SUPER_MAGIC */,
+		0x736675005346544e /* UFSD */,
 		0x58465342 /* XFS_SB_MAGIC */,
 		0x2FC12FC1 /* ZFS_SUPER_MAGIC */,
 	};
-- 
2.30.2