Files
packages/utils/fuse3/patches/101-mount_util.c-restore-symlink-check.patch
Georgi Valkov 1408f86bd4 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>
2025-06-23 10:26:34 +02:00

37 lines
949 B
Diff

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);