File: 0007-Add_autofs_to_mountpoint_file_system_whitelist.patch

package info (click to toggle)
fuse 2.9.9-6
  • links: PTS
  • area: main
  • in suites: bookworm
  • size: 9,672 kB
  • sloc: ansic: 16,570; sh: 4,865; makefile: 167; javascript: 103
file content (34 lines) | stat: -rw-r--r-- 1,285 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
From 0ef031bfc08564e7c5920432e13373dcf18dbc63 Mon Sep 17 00:00:00 2001
From: Robo Shimmer <roboshim@users.noreply.github.com>
Date: Tue, 31 Jul 2018 16:20:56 +0200
Subject: [PATCH] Add autofs to mountpoint file system whitelist

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

diff --git a/ChangeLog b/ChangeLog
index f5d24ca6..2a5168ce 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,6 +7,7 @@ FUSE 2.9.9 (2019-01-04)
 * Fixed `readdir` bug when non-zero offsets are given to filler and the
   filesystem client, after reading a whole directory, re-reads it from a
   non-zero offset e. g. by calling `seekdir` followed by `readdir`.
+* Allow fuse to be mounted into autofs folder hierarchy.
 
 FUSE 2.9.8 (2018-07-24)
 =======================
diff --git a/util/fusermount.c b/util/fusermount.c
index b8c164dd..2ca75105 100644
--- a/util/fusermount.c
+++ b/util/fusermount.c
@@ -1051,6 +1051,7 @@ static int check_perm(const char **mntp, struct stat *stbuf, int *mountpoint_fd)
 		0x24051905 /* UBIFS_SUPER_MAGIC */,
 		0x58465342 /* XFS_SB_MAGIC */,
 		0x2FC12FC1 /* ZFS_SUPER_MAGIC */,
+		0x00000187 /* AUTOFS */,
 	};
 	for (i = 0; i < sizeof(f_type_whitelist)/sizeof(f_type_whitelist[0]); i++) {
 		if (f_type_whitelist[i] == fs_buf.f_type)