From 1408f86bd4d310aac64ba521b7c2f3ca87a24b37 Mon Sep 17 00:00:00 2001 From: Georgi Valkov Date: Fri, 13 Jun 2025 10:35:28 +0300 Subject: [PATCH] fuse3: mount_util.c: restore symlink check Fixes the following error when mounting iPhone using ifuse: ifuse /mnt --container com.httpstorm.httpstorm mount: mounting ifuse on /mnt failed: Invalid argument [1] https://github.com/libfuse/libfuse/pull/1247 Signed-off-by: Georgi Valkov --- utils/fuse3/Makefile | 2 +- ...1-mount_util.c-restore-symlink-check.patch | 36 +++++++++++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 utils/fuse3/patches/101-mount_util.c-restore-symlink-check.patch diff --git a/utils/fuse3/Makefile b/utils/fuse3/Makefile index 9a518f0888..f3a131955e 100644 --- a/utils/fuse3/Makefile +++ b/utils/fuse3/Makefile @@ -10,7 +10,7 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=fuse3 PKG_VERSION:=3.17.2 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE:=fuse-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/libfuse/libfuse/releases/download/fuse-$(PKG_VERSION) diff --git a/utils/fuse3/patches/101-mount_util.c-restore-symlink-check.patch b/utils/fuse3/patches/101-mount_util.c-restore-symlink-check.patch new file mode 100644 index 0000000000..fdd0185cf7 --- /dev/null +++ b/utils/fuse3/patches/101-mount_util.c-restore-symlink-check.patch @@ -0,0 +1,36 @@ +From: Georgi Valkov +Date: Fri, 13 Jun 2025 08:49:22 +0300 +Subject: [PATCH] mount_util.c: restore symlink check + +Fixes the following error when mounting iPhone using ifuse: +ifuse /mnt --container com.httpstorm.httpstorm +mount: mounting ifuse on /mnt failed: Invalid argument + +The regression was introduced in +74b1df2e84e836a1710561f52075d51f20cd5c78 + +Signed-off-by: Georgi Valkov +--- + lib/mount_util.c | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/lib/mount_util.c ++++ b/lib/mount_util.c +@@ -54,6 +54,7 @@ static int mtab_needs_update(const char + * Skip mtab update if /etc/mtab: + * + * - doesn't exist, ++ * - is a symlink, + * - is on a read-only filesystem. + */ + res = lstat(_PATH_MOUNTED, &stbuf); +@@ -64,6 +65,9 @@ static int mtab_needs_update(const char + uid_t ruid; + int err; + ++ if (S_ISLNK(stbuf.st_mode)) ++ return 0; ++ + ruid = getuid(); + if (ruid != 0) + setreuid(0, -1); -- 2.30.2