mirror of
https://github.com/openwrt/packages.git
synced 2025-12-10 12:41:22 +00:00
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 <gvalkov@gmail.com>
This commit is contained in:
committed by
Robert Marko
parent
9ef176aaec
commit
1408f86bd4
@@ -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)
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
From: Georgi Valkov <gvalkov@gmail.com>
|
||||
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 <gvalkov@gmail.com>
|
||||
---
|
||||
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);
|
||||
Reference in New Issue
Block a user