aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorLines
5 daysImplemented scripts for different build targetsandroid-stableLeonard Kugis-0/+23
Invoke them like this: SYSROOT_DIR=<sysroot> scripts/make-<target>.sh <sysroot> being the desired sysroot directory for the install files. <target> being the target definition.
5 daysAdjusted meson conf for android ndk compatibilityLeonard Kugis-230/+251
6 daysInitial commit for android-stableLeonard Kugis-1/+44
2025-08-19Release 3.17.4Bernd Schubert-1/+12
Signed-off-by: Bernd Schubert <bernd@bsbernd.com>
2025-08-19Add signify verification in make_release_tarball.shBernd Schubert-0/+1
Signed-off-by: Bernd Schubert <bernd@bsbernd.com>
2025-08-19tests: move struct size assertions into a testCismonX-16/+25
These checks are meant for libfuse maintainers only, and should not be exposed to users. Signed-off-by: CismonX <admin@cismon.net> (cherry picked from commit a63fc71a55038f49671eb56d0ade99a48ad8d7ab)
2025-08-19fuse_loop_mt.c: fix close-on-exec flag on clone fdCismonX-3/+9
Closes: https://github.com/libfuse/libfuse/issues/1310 Signed-off-by: CismonX <admin@cismon.net> (cherry picked from commit 42b9b3bbb71d38be6a5670bbd0948cf406c1573c)
2025-08-06mount_util.c: check if utab exists before updateGeorgi Valkov-0/+4
Do not attempt to update /run/mount/utab if it doesn't exist. Note: if this path ever changes, utab updates will break. Fixes the following error when mounting iPhone using ifuse: ifuse /mnt --container com.httpstorm.httpstorm mount: mounting ifuse on /mnt failed: Invalid argument On OpenWRT by default mount-utils is not installed and utab does not exist. /bin/mount is a symlink to /bin/busybox and does not support updating of utab. If mount-utils is installed: /run/mount/ exists, but does not contain utab. The mount-utils instance is under /usr/bin/mount, so a hard-coded call to /bin/mount will still fail. Using /usr/bin/mount succeeds but does not create utab. [1] https://github.com/libfuse/libfuse/pull/1247 Signed-off-by: Georgi Valkov <gvalkov@gmail.com> (cherry picked from commit 3793b1748ad151c8043dee1db198fffa3dbb5a67) Signed-off-by: Georgi Valkov <gvalkov@gmail.com>
2025-08-06fuse_signals.c: fix build warning when HAVE_BACKTRACE is undefinedGeorgi Valkov-0/+2
BT_STACK_SZ and backtrace_buffer are not used when HAVE_BACKTRACE is undefined. Wrap them in #ifdef to avoid a build warning: ../lib/fuse_signals.c:31:14: warning: 'backtrace_buffer' defined but not used [-Wunused-variable] 31 | static void *backtrace_buffer[BT_STACK_SZ]; | ^~~~~~~~~~~~~~~~ Signed-off-by: Georgi Valkov <gvalkov@gmail.com> (cherry picked from commit 6787608e5655b3d833a541a9f0d5a3159ae51f0e) Signed-off-by: Georgi Valkov <gvalkov@gmail.com>
2025-07-19Update AUTHORS file for 3.17.3Bernd Schubert-0/+3
2025-07-16Increase version to 3.17.3Bernd Schubert-1/+7
2025-07-16fusermount: Fix the close_range ifdefBernd Schubert-2/+2
This fixes commit 82bcd818 That commit had removed HAVE_LINUX_CLOSE_RANGE in meson generation, but didn't remove the usage in fusermount.c - fusermount was then not using the close_range syscall. Closes: https://github.com/libfuse/libfuse/issues/1284 Signed-off-by: Bernd Schubert <bernd@bsbernd.com> (cherry picked from commit 194023c5999651386a3ddbf91fdd710d661d083b)
2025-07-16Avoid double unmount on FUSE_DESTROYBernd Schubert-12/+24
This is a long standing issue, a system could have unmounted /path/to/mnt and then fuse-client/kernel would send FUSE_DESTROY, which would then again try a umount. Given that FUSE_DESTROY is async, that umount might arrive any time later and might possibly unmount a wrong mount point. A warning as in issue #1286 is just minor to that. Code wise this uses atomics to free the char *, as FUSE_DESTROY might race with a signal and a double free might be possible without proctection. A lock might run into the same issue, if the signal would arrive at the wrong time a double lock would be possible. Additionally, fuse_session_mount() is updated, to first duplicatate the pointer and to then do the kernel mount - reverting the kernel mount in case of strdup() failure is much harder. Closes: https://github.com/libfuse/libfuse/issues/1286 Signed-off-by: Bernd Schubert <bernd@bsbernd.com> (cherry picked from commit d8253770ac2cf4b8769e8cf41eb3c629f30ee80f)
2025-07-16memfs_ll: fix deadlock in truncate operationLong Li-1/+0
Remove redundant mutex lock acquisition in the truncate() method to prevent deadlock. The issue occurs when memfs_setattr() already holds the mutex lock and then calls truncate(), which attempts to acquire the same lock again. Signed-off-by: Long Li <leo.lilong@huawei.com> (cherry picked from commit b96c738b10e9a308725c62b9392ba7d553eec254)
2025-05-21conn->want conversion: Fix fuse_apply_conn_info_opts()Bernd Schubert-108/+200
fuse_apply_conn_info_opts() was applying to 'want_ext', which would cause conflicts with 'want' if the application applied its own flags to 'conn->want'. Solution is: - to move fuse_{set,unset,get}_feature_flag and convert_to_conn_want_ext() to fuse_lowlevel.c and to define them as part of the public API, although convert_to_conn_want_ext() should not be used - it is currently needed to be a public function due as it needs to be defined for the tests. Related to https://github.com/libfuse/libfuse/issues/1171 and https://github.com/libfuse/libfuse/pull/1172. Closes: https://github.com/libfuse/libfuse/issues/1171 Signed-off-by: Bernd Schubert <bschubert@ddn.com> (cherry picked from commit baadab0492a495fda98216b351976d2e5d6d0866)
2025-05-21Add container_of and ROUND_UP macrosBernd Schubert-8/+6
Needed by follow up commits. container_of is actually just moved/consolidated to util.h. Signed-off-by: Bernd Schubert <bschubert@ddn.com> (cherry picked from commit c5a032b3410d7225ac0355355faa63565a209943)
2025-05-21Make conn->want/want_ext conversion non fatalBernd Schubert-27/+3
there are too many issues with conn->want and conn->want_ext conversion, for now just log a warning, but setting both flags is now not fatal anymore. Signed-off-by: Bernd Schubert <bschubert@ddn.com>
2025-04-26meson.build: make special_funcs check more reliableGiulio Benetti-2/+2
Unfortunately while cross-compiling with build tools like Buildroot it happens to have repeated flags or anything that could lead to a warning. This way the check fails because of a warning not related to the special function. So let's use cc.links() and increase minimum meson_version to 0.60 since cc.links() has been added during that version. Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
2025-04-26Fix meson function testsBernd Schubert-18/+49
Several meson tests were incorrectly failing Checking for function "static_assert" : NO (cached) Checking for function "pthread_setname_np" : NO (cached) Check usable header "#include <linux/close_range.h>" : NO (cached) These functions get now tested with compilation tests and get found on my system. Checking if "static_assert check" compiles: YES Checking if "pthread_setname_np check" compiles: YES Checking if "close_range check" compiles: YES Signed-off-by: Bernd Schubert <bschubert@ddn.com> Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
2025-04-24Update to 3.17.2Bernd Schubert-1/+21
2025-04-23signal handlers: Store fuse_session unconditionallyBernd Schubert-4/+9
Commit dae1184 ("Add syslog and fatal signal handler feature") added fuse_set_fail_signal_handlers() which can store "se". But as fuse_set_signal_handlers() also stores the object storing it was made conditionally if not set already. As per https://github.com/libfuse/libfuse/issues/1182 this breaks some applications like osspd, that have multiple sessions and rely on the right order and that the last call of fuse_set_signal_handlers() wins. Special thanks to Sébastien Noel to debug this issue. Closes: https://github.com/libfuse/libfuse/issues/1182 Signed-off-by: Bernd Schubert <bernd@bsbernd.com>
2025-04-23example: fix memfs_rename deadlock errorswj-4/+5
Signed-off-by: swj <1186093704@qq.com>
2025-04-23Check if pthread_setname_np() exists before use itGiulio Benetti-1/+6
Since pthread_setname_np() is the only pthread function that requires NPTL and it basically only set thread name, let's check if pthread_setname_np() does exist, otherwise let's not call pthread_setname_np() to shrink dependencies. Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
2025-04-16conn: prevent duplicate flag conversion in high-level interfaceBernd Schubert-15/+215
The high-level interface triggers flag conversion twice: once in the high-level init and once in the low-level init. This caused false "both 'want' and 'want_ext' are set" errors when using fuse_set_feature_flag() or fuse_unset_feature_flag(). The existing check for duplicate conversion only worked when 32-bit flags were set directly. When using the preferred flag manipulation functions, conn->want and the lower 32 bits of conn->want_ext would differ, triggering the error. Fix this by synchronizing conn->want with the lower 32 bits of conn->want_ext after conversion, ensuring consistent state for subsequent calls. Closes: https://github.com/libfuse/libfuse/issues/1171 Signed-off-by: Bernd Schubert <bschubert@ddn.com>
2025-04-15passthrough_hp: enable splice move by defaultJoanne Koong-3/+5
This commit enables splice moves by default, unless the caller opts into nosplice. Signed-off-by: Joanne Koong <joannelkoong@gmail.com>
2025-04-15lib: remove second fuse_main_real_versioned declarationBen Dooks-3/+0
Newer gccs now use -Werror=redundant-decls which means that anyone including fuse.h is getting an error of: /usr/include/fuse3/fuse.h:959:5: error: redundant redeclaration of ‘fuse_main_real_versioned’ [-Werror=redundant-decls] 959 | int fuse_main_real_versioned(int argc, char *argv[], | ^~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/fuse3/fuse.h:885:5: note: previous declaration of ‘fuse_main_real_versioned’ with type ‘int(int, char **, const struct fuse_operations *, size_t, struct libfuse_version *, void *)’ {aka ‘int(int, char **, const struct fuse_operations *, long unsigned int, struct libfuse_version *, void *)’} 885 | int fuse_main_real_versioned(int argc, char *argv[], | ^~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
2025-04-15fuse_lowlevel: Set bufsize if HAVE_SPLICE is not define and avoid raceBernd Schubert-6/+13
These are several buf size fixes 1) Set bufsize when HAVE_SPLICE is not defined. Addresses https://github.com/libfuse/libfuse/issues/1184 2) Check in the read retry condition for bufsize, i.e. the value passed to read and not for the buf->mem_size. Using buf->mem_size can be startup racy. Additionally we now also set bufsize on allocation to avoid these races. 3) Allocation and value assigned needs to follow the pattern bufsize = se->bufsize; buf_alloc(bufsize, internal) buf->mem_size = bufsize; I.e. bufsize has to be retrieved first, as se->bufsize might change at anytime - the value used for allocation and must not differ from the value actually used. This also tries to set large sizes in passthrough_hp, to catch issues in xfstests - though requires to set /proc/sys/fs/fuse/max_pages_limit Signed-off-by: Bernd Schubert <bschubert@ddn.com>
2025-04-15Fix static_assert build failure with C++ version < 11Giulio Benetti-4/+2
At the moment build fails due to lack of static_assert: https://gitlab.com/jolivain/buildroot/-/jobs/9606292537 this means that the check per date is not enough, so let's use meson to check if static_assert() is present or not and simplify fuse_static_assert() definition by only checking HAVE_STATIC_ASSERT. Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
2025-04-15Fix build with kernel < 5.9Giulio Benetti-3/+7
linux/close_range.h is only available since kernel 5.9 and https://github.com/torvalds/linux/commit/60997c3d45d9a67daf01c56d805ae4fec37e0bd8 resulting in the following build failure: ../util/fusermount.c:40:10: fatal error: linux/close_range.h: No such file or directory So let's check for header presence and emit HAVE_LINUX_CLOSE_RANGE_H accordingly and check for it when including <linux/close_range.h> and calling close_range() instead of checking for close_range() function in meson and check against HAVE_CLOSE_RANGE. Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
2025-04-15Fix a comment typo "passed to the filesystem.n"Bernd Schubert-1/+1
Closes: https://github.com/libfuse/libfuse/issues/1168 Signed-off-by: Bernd Schubert <bernd@bsbernd.com>
2025-04-15fuse_lowlevel: Simplify se->buf_reallocableBernd Schubert-12/+18
se->buf_reallocable is true when reading /dev/fuse is handled from internal functions - we can set the variable in fuse_session_receive_buf_internal(). With that we also don't need to have it an _Atomic variable anymore. In _fuse_session_receive_buf() we can use "bool internal" to check if the buffer can be re-allocated. Signed-off-by: Bernd Schubert <bschubert@ddn.com>
2025-04-15fuse_session_receive_buf: Fix the pipe buf sizeBernd Schubert-3/+13
This fixes dynamic buffer allocation in commit 0e0f43b79b9b ("Reallocate fuse_session buffer...") I noticed that when I increased the default fuse buf size as possible in recent kernels. Signed-off-by: Bernd Schubert <bschubert@ddn.com>
2025-03-24Release version 3.17.1Bernd Schubert-5/+15
Signed-off-by: Bernd Schubert <bernd@bsbernd.com>
2025-03-24fuse: Fix want flag conversionBernd Schubert-30/+264
32-bit conn->want flags been left to be ABI compatible to 3.10, even though the so version was changed. The more recent way is to use fuse_set_feature_flag(), which will use conn->want_ext. Given that we now have two flags (want and want_ext), we need to convert and that brought several issues - If the application sets conn->want, that needs to be set into the lower 32 bit of conn->want_ext. As the application might actually unset values, it really has to be a copy and not just 'or' - fixed now. - convert_to_conn_want_ext() actually needs to check for _modified_ conn->want and conn->want_ext - convert_to_conn_want_ext() must consider being called from high and lowlevel interfact, with different want_ext_default and want_default values. It is only a failure, if the application changed both, conn->want and conn->want_ext. This function was failing in issue #1171, because high level fuse_fs_init() was changing values and then lowlevel do_init() was incorrectly failing on that. This also adds a new test (test_want_conversion) and sets values into example/{hello.c,hello_ll.c} Also some more internal users of conn->want are converted to fuse_{set,unset}_feature_flag(). Closes: https://github.com/libfuse/libfuse/issues/1171 Signed-off-by: Bernd Schubert <bernd@bsbernd.com> (cherry picked from commit f68970cd235a7e14026ca0f6240428bbebe8223b)
2025-03-18fusermount: prevent stdio FDs from being reusedBernd Schubert-28/+54
Redirect stdin/stdout/stderr to /dev/null to prevent newly opened file descriptors from reusing these low numbers (0,1,2) and potential issues with that. Signed-off-by: Bernd Schubert <bschubert@ddn.com>
2025-03-14fuse_common.h: Convert back FUSE_CAP_ from enum to definesBernd Schubert-322/+315
Some applications use that for detection of features between distributions/libfuse version. Closes: https://github.com/libfuse/libfuse/issues/1163 Signed-off-by: Bernd Schubert <bschubert@ddn.com> (cherry picked from commit 3ae5ca7443348aabad9bc71b9d5b0999f8292379)
2025-03-14Add PanFS to whitelistjnr0006-0/+1
Added PanFSto whitelist. This should allow us to mount gocryptfs onto the parallel filesystem. Signed-off-by: Jacob Riley <jnr0006@uah.edu> (cherry picked from commit 3a291c355f3a4966ff3ebb6841b31da0d3010f52)
2025-02-20mount: fix closing stdout/err and error logsVassili Tchersky-10/+11
Don't spawn a setuid children with FD 1&2 closed. Check status and not errno after posix_spawn(p). Add comments to fix later error checking, as posix_spawn(p) returns non-zero status only if clone/vfork/rfork fails. If only setup (open, dup2) or execve fails, the forked process exit with 127 but posix_spawn returns zero. Signed-off-by: Vassili Tchersky <vt+git@vbc.su>
2025-02-18Released fuse-3.17.1-rc1Bernd Schubert-4/+16
2025-02-18github ci tests: Update the stable branch name to include fuse-Bernd Schubert-9/+15
The branch is actually called fuse-3.17.x Also disable checkpatch for branches except master, as it is to do basic checks, while stable branches do not need that check, assuming cherry-pick happens from master. Issue with it is that persistently complains about dependabot changes. Signed-off-by: Bernd Schubert <bernd@bsbernd.com>
2025-02-18Fix a typo in test/ci-build.sh (ct vs cat)Bernd Schubert-1/+1
Signed-off-by: Bernd Schubert <bschubert@ddn.com>
2025-02-18Avoid nested function declarations in helper functionsBernd Schubert-62/+28
libfuse-3.17 introduced several functions that should only be called via inlined helper functions, never directly. To enforce this, these functions were declared within the inlined functions. However, this triggers the compiler warning "-Werror=nested-externs". While this warning is valid, the nested declarations were intentional to prevent direct usage of these functions. Rather than suppressing the warning with pragmas, move these function declarations outside the helper functions while maintaining the intended access restrictions through other means. Closes: https://github.com/libfuse/libfuse/issues/1134 Signed-off-by: Bernd Schubert <bschubert@ddn.com>
2025-02-18mount_bsd: Remove unused headersVassili Tchersky-4/+0
Removed: - <sys/user.h>: used to be for kinfo_proc, long gone from the code - <paths.h>: used to be for _PATH_DEV and _PATH_DEVNULL, long gone - <limits.h>: used to be for _POSIX2_LINE_MAX, long gone - <sys/stat.h>: used to be for fstat/stat, long gone Signed-off-by: Vassili Tchersky <vt+git@vbcy.org>
2025-02-18mount_bsd: Show errors when syscalls failedVassili Tchersky-3/+7
Log on unmount() and close() failure Signed-off-by: Vassili Tchersky <vt+git@vbcy.org>
2025-02-18mount_bsd: Proper exit callsVassili Tchersky-4/+4
Use _exit() instead of exit() inside children Signed-off-by: Vassili Tchersky <vt+git@vbcy.org>
2025-02-18FreeBSD: Remove useless optionsVassili Tchersky-31/+6
These options never had any effect. See https://svnweb.freebsd.org/base?view=revision&revision=347544 Signed-off-by: Vassili Tchersky <vt+git@vbcy.org>
2025-02-18mount_bsd: Fix usage of libfuse_strtolVassili Tchersky-3/+4
The check on fd < 0 was recently removed. However, this check is important as the content of FUSE_DEV_FD is passed as-is to mount_fusefs, and a string beginning by '-' is treated as an option. Additionally, add a proper include and type. Signed-off-by: Vassili Tchersky <vt+git@vbcy.org>
2025-02-18tests: Re-enable mknod and mkfifo tests on FreeBSDVassili Tchersky-6/+0
Signed-off-by: Vassili Tchersky <vt+git@vbcy.org>
2025-02-18tests: Disable tests with TMP_FILE on FreeBSDVassili Tchersky-0/+4
Not supported yet on this platform. See https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=283179 Signed-off-by: Vassili Tchersky <vt+git@vbcy.org>
2025-02-18build(deps): bump github/codeql-action from 3.28.8 to 3.28.9dependabot[bot]-2/+2
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.28.8 to 3.28.9. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/dd746615b3b9d728a6a37ca2045b68ca76d4841a...9e8d0789d4a0fa9ceb6b1738f7e269594bdd67f0) --- updated-dependencies: - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>